Repository navigation
Conversation
Signed-off-by: Guan Gui <guiguan@gmail.com>
|
Welcome @guiguan! It looks like this is your first PR to milvus-io/milvus-sdk-node 🎉 |
shanghaikid
approved these changes
Oct 8, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: guiguan, shanghaikid The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The channel pool's
destroycloses each client and then callsclient.getChannel().getConnectivityState(true). On a closed channel, grpc-js (1.14.4) still acts ontryToConnect: it restarts name resolution and dials a new connection. Nothing references that channel any more, so the connection is never closed.Each pooled client that is destroyed therefore leaves one connection behind. That happens on
closeConnection()and when a topology change replaces the pool, which holds at least 2 clients by default.We found this through Attu v3.0.1, which ships this SDK (3.0.6). Against a TLS Milvus, with a browser tab left open, the proxies held ~590 established connections from the one Attu pod, growing by about one a minute.
Fix
destroyonly closes the client. generic-pool ignores the valuedestroyresolves to, so nothing depends on the removed call. It dates from the originalcloseConnection(), which returned the post-close state.Test
test/utils/ChannelPool.spec.tsruns a local HTTP/2 TLS server with the repo's test certificates and needs no Milvus. It does the following, then expects 0 sessions on the server:tls.skipCertCheck;test/utilsGrpc, Connection and Data specs still pass.Standalone reproduction with grpc-js 1.14.4 directly, 5 create/close cycles each:
close()only, TLS or plaintextclose()+getConnectivityState(true), plaintextclose()+getConnectivityState(true), TLS