Skip to content
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

Support connection pool #261

Merged
merged 10 commits into from
Dec 14, 2023
Merged

Support connection pool #261

merged 10 commits into from
Dec 14, 2023

Conversation

shanghaikid
Copy link
Contributor

In this pr, according to the https://grpc.io/docs/guides/performance/, I add a connection pool for the node sdk, it will have a breaking change for the closeConnection function. it should close until all channels are cleaned in the pool and return the connect status. All other methods should be compatible with old version.

User now is able to set up the pool min and max in the ClientConfig object. by default it is 10 and 2.

shanghaikid and others added 4 commits December 8, 2023 19:00
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ruiyi.jiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (54f10eb) 95.15% compared to head (40ca6d2) 96.39%.

Files Patch % Lines
milvus/grpc/GrpcClient.ts 97.36% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #261      +/-   ##
==========================================
+ Coverage   95.15%   96.39%   +1.24%     
==========================================
  Files          39       39              
  Lines        1837     1859      +22     
  Branches      436      474      +38     
==========================================
+ Hits         1748     1792      +44     
+ Misses         86       61      -25     
- Partials        3        6       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 7 to +12
export enum CONNECT_STATUS {
NOT_CONNECTED,
CONNECTING,
CONNECTED,
CONNECTING = 0, // GRPC channel state connecting
CONNECTED = 1, // GRPC channel state ready
UNIMPLEMENTED,
SHUTDOWN = 5, // GRPC channel state shutdown
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set NOT_CONNECTED and UNIMPLEMENTED more clearly?

@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nameczz, shanghaikid

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
@shanghaikid shanghaikid merged commit a6457e3 into main Dec 14, 2023
4 checks passed
@shanghaikid shanghaikid deleted the pool branch December 14, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants