-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MilvusClientV2Pool.getClient is null sometimes when using client pool #1118
Comments
The ClientPool could return null for getClient() method:
I didn't throw an exception here, do you think it is necessary to throw the error? In my opinion, when user gets a null value, he can check the returned value and recall the getClient() again. The client.Pool is a GenericKeyedObjectPool. The borrowObject() method internally has a timeout value to wait for a client to be created. The timeout value can be configured by PoolConfig.maxBlockWaitDuration:
The default value of maxBlockWaitDuration is 3 seconds. |
I think the right thing is to throw error. |
Fixed by this pr: https://github.com/milvus-io/milvus-sdk-java/pull/1170/files |
MilvusClientV2Pool milvusClientV2Pool = new MilvusClientV2Pool(poolConfig, connectConfig);
milvusClientV2Pool.getClient is null occurs sometimes!
The text was updated successfully, but these errors were encountered: