Repository navigation
fix(go-client): loopForRequest not return and retry forever - #1444
Merged
Merged
Conversation
should update config and change target
Contributor
Author
|
During test, we found that there is still timeout exists, thus locate another problem--sdk should not retry on |
Contributor
Author
|
Futhermore, if we remove user-side call of log: |
Codecov Report
@@ Coverage Diff @@
## master #1444 +/- ##
=========================================
Coverage ? 53.58%
=========================================
Files ? 27
Lines ? 2538
Branches ? 0
=========================================
Hits ? 1360
Misses ? 1132
Partials ? 46 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
hycdong
approved these changes
Apr 18, 2023
acelyc111
approved these changes
Apr 18, 2023
Closed
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.

What problem does this PR solve?
fix #1385
What is changed and how does it work?
expected behavior:
after replica server restart,The client should be able to reconnect with node without considering the client configuration update (reselecting the primary replica).
Actually, client configuration update is another issue we should talk about. I'd like to discuss that in another issue.
In this pr, we focus on why client cannot reconnect with restarted server.
SDK use several loop to monitor rpc.conn, when server is closed,
loopForDialingwill continue to retry dialling until connected with server(when server is restart),then, two new looploopForRequest&loopForResponsewill be created to handle request.however,
loopForRequestwill not return when correlativeloopForResponsereturned because of IsNetworkClosed(EOF), since latter only return nil and will not shutdown tom. thus, there will be more aliveloopForRequestthanloopForResponsein this case.SDK retried not on timeout err, however, we wrapped timeout err incorrectly in here
incubator-pegasus/go-client/session/session.go
Line 338 in d16e65c
multisetwill continue to do retry here since err we passed to outer is no longer timeout errincubator-pegasus/go-client/pegasus/table_connector.go
Line 719 in d16e65c
Checklist
monitor capture based on this pr:

timeout is eliminated after server restart.