-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conversation
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]>
Codecov ReportAttention:
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. |
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 |
There was a problem hiding this comment.
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?
[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 |
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
Signed-off-by: ryjiang <[email protected]>
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
andmax
in theClientConfig
object. by default it is 10 and 2.