mirror of https://github.com/milvus-io/milvus.git
MS-462 Run milvus server twices, should display error
Former-commit-id: 5d9e7b62470cf48ba84d7be358b0f277268fa831pull/191/head
parent
abb1979f0c
commit
5857d8163e
|
@ -19,6 +19,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
|||
- MS-436 - Delete vectors failed if index created with index_type: IVF_FLAT/IVF_SQ8
|
||||
- MS-450 - server hang after run stop_server.sh
|
||||
- MS-449 - Add vectors twice success, once with ids, the other no ids
|
||||
- MS-462 - Run milvus server twices, should display error
|
||||
|
||||
## Improvement
|
||||
- MS-327 - Clean code for milvus
|
||||
|
|
|
@ -34,6 +34,17 @@ static std::unique_ptr<::grpc::Server> server;
|
|||
|
||||
constexpr long MESSAGE_SIZE = -1;
|
||||
|
||||
class NoReusePortOption : public ::grpc::ServerBuilderOption {
|
||||
public:
|
||||
void UpdateArguments(::grpc::ChannelArguments* args) override {
|
||||
args->SetInt(GRPC_ARG_ALLOW_REUSEPORT, 0);
|
||||
}
|
||||
|
||||
void UpdatePlugins(std::vector<std::unique_ptr<::grpc::ServerBuilderPlugin>>*
|
||||
plugins) override {}
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
GrpcMilvusServer::StartService() {
|
||||
if (server != nullptr) {
|
||||
|
@ -52,6 +63,7 @@ GrpcMilvusServer::StartService() {
|
|||
std::string server_address(address + ":" + std::to_string(port));
|
||||
|
||||
::grpc::ServerBuilder builder;
|
||||
builder.SetOption(std::unique_ptr<::grpc::ServerBuilderOption>(new NoReusePortOption));
|
||||
builder.SetMaxReceiveMessageSize(MESSAGE_SIZE); //default 4 * 1024 * 1024
|
||||
builder.SetMaxSendMessageSize(MESSAGE_SIZE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue