-
Notifications
You must be signed in to change notification settings - Fork 345
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
[Issue 491][rpc_client]fix: timeout guarantee for RequestOnCnx #492
Conversation
Signed-off-by: jonyhy96 <[email protected]>
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.
The change LGTM +1, just a little comments, please check
rpcResult := &RPCResult{ | ||
Cnx: cnx, | ||
} | ||
ch := make(chan result, 1) |
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.
Can we consider adjusting the size of the channel buffer appropriately? It looks like 10 is a good choice?
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.
0 maybe enough for this because there will be only one result sends to ch
. Set it to 1 to prevent block happens on the sender side.
@wolfstudy @jonyhy96 Hi. Could we proceed with this PR? Lack of the timeout on connection is a problem causing locking producer, would be great if we can release this fix |
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.
LGTM
ping @wolfstudy |
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.
Great job! LGTM +1
Fixes #491
Motivation
see #491
Modifications
add timeout guarantee to RequestOnCnx
Verifying this change
Does this pull request potentially affect one of the following parts:
Documentation