Fix a bug of ClientPool that rpc channel is not properly closed#1756
Fix a bug of ClientPool that rpc channel is not properly closed#1756sre-ci-robot merged 1 commit intomilvus-io:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yhmo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR aims to fix resource-leak/cleanup behavior in the client pool so underlying RPC channels can be properly closed, and updates an example to reliably close pooled and non-pooled clients.
Changes:
- Make the ClientCache scheduler thread a daemon thread.
- On timer stop, return cached active/retired clients back to the underlying pool to enable proper destruction/closure.
- Update
ConsistencyLevelExampleto ensureMilvusClientV2Pooland the staticMilvusClientV2are closed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sdk-core/src/main/java/io/milvus/pool/ClientCache.java | Adjusts scheduler thread behavior and attempts to return cached clients to the pool during shutdown. |
| examples/src/main/java/io/milvus/v2/ConsistencyLevelExample.java | Ensures pool/client resources are closed via finally and at program end. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
08d30a5 to
b994aea
Compare
Signed-off-by: yhmo <yihua.mo@zilliz.com>
No description provided.