-
Notifications
You must be signed in to change notification settings - Fork 9
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
Handle MsgSnapshot sent before MsgAppend #389
Handle MsgSnapshot sent before MsgAppend #389
Conversation
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
info!("fast path: ongoing {}:{} {}, MsgSnapshot rejected", | ||
self.store_id, region_id, new_peer_id; | ||
"to_peer_id" => msg.get_to_peer().get_id(), |
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.
nit: format
info!("fast path: ongoing {}:{} {}, MsgSnapshot rejected", | |
self.store_id, region_id, new_peer_id; | |
"to_peer_id" => msg.get_to_peer().get_id(), | |
info!("fast path: ongoing {}:{} {}, MsgSnapshot rejected", | |
self.store_id, region_id, new_peer_id; | |
"to_peer_id" => msg.get_to_peer().get_id(), |
Signed-off-by: Calvin Neo <[email protected]>
/retest |
What is changed and how it works?
Issue Number: Close #xxx
According to https://github.com/tikv/raft-rs/blob/2aefbf627f243dd261b7585ef1250d32efd9dfe7/src/raft.rs#L842,
if log is truncated in Leader, a MsgSnapshot may be sent directly before a MsgAppend.
If such MsgSnapshot is received when a FAP snapshot IS BUILDING, then it will be dropped.
What's Changed:
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note