[Bug]: The Milvus Java SDK occasionally returns a null object when calling MilvusClientV2Pool.getClient("MME"), even if there are many available connections in the pool, the NullPointerException will still happen. #37188
The Milvus Java SDK occasionally returns a null object when calling MilvusClientV2Pool.getClient("MME"), even if there are many available connections in the pool, the NullPointerException will still happen.
Client Code:
1. PoolConfig( ):
2. getClient( ):
Log:
1. ActiveClient is 6, IdleClient is 0, less than the TotalPerKey(50)
2. When request 1 is stuck during client.createCollection, and request 2 comes in and executes MilvusClientV2Pool.getClient("MME"), it receives a null object.
This is just one example; sometimes, even when request 1 is not stuck, a NullPointerException still occurs. It happens roughly once every two weeks, and the root cause remains unknown.
Expected Behavior
In situations where the connection pool is not full, it should not return a null object.
Is there an existing issue for this?
Environment
Current Behavior
The Milvus Java SDK occasionally returns a null object when calling MilvusClientV2Pool.getClient("MME"), even if there are many available connections in the pool, the NullPointerException will still happen.
Client Code:
1. PoolConfig( ):
2. getClient( ):
1. ActiveClient is 6, IdleClient is 0, less than the TotalPerKey(50)
2. When request 1 is stuck during client.createCollection, and request 2 comes in and executes MilvusClientV2Pool.getClient("MME"), it receives a null object.
Expected Behavior
In situations where the connection pool is not full, it should not return a null object.
Steps To Reproduce
No response
Milvus Log
No response
Anything else?
No response