-
Notifications
You must be signed in to change notification settings - Fork 656
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
Receipt of REPLCONF VERSION reply should be triggered by event #1320
Conversation
This add the missing return when repl_state change to RECEIVE_VERSION_REPLY, this way we won’t be blocked if the primary doesn’t reply with REPLCONF VERSION. In practice i guess this is no likely to block in this context, reading small responses are are likely to be received in one packet, so So this is just a cleanup (consistent with the previous state machine processing). Signed-off-by: Binbin <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1320 +/- ##
============================================
- Coverage 70.71% 70.55% -0.17%
============================================
Files 115 115
Lines 63159 63160 +1
============================================
- Hits 44666 44562 -104
- Misses 18493 18598 +105
|
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.
So we have to wait for the read handler to run again for each of the replies?
There's a state machine diagram in a comment in this file too. Maybe we should update it too.
|
Signed-off-by: Binbin <[email protected]>
yean, look like the answer is yes. (in happy path we don't have to since we pipeline the write, and we can read the reply without any block) |
But we |
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.
Beautiful
yes, what i want to say is the "ideally path". In current code, we do need to wait for the next read handler. |
OK, if sync is slow to start, we can optimize it later. I don't think it's too slow. |
This add the missing return when repl_state change to RECEIVE_VERSION_REPLY,
this way we won’t be blocked if the primary doesn’t reply with REPLCONF
VERSION.
In practice i guess this is no likely to block in this context, reading
small responses are are likely to be received in one packet, so this
is just a cleanup (consistent with the previous state machine processing).
Also update the state machine diagram to mention the VERSION reply.