raftstore: write tombstone state with writes in one batch when catching up logs for merge [release-2.1]#4615
Merged
Merged
Conversation
Member
Author
|
still have some compile errors, will be fixed later |
Member
Author
|
The change is a little large which is not stable enough to merge into the release branch, so finding an easy way to work around. |
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
Member
Author
|
PTAL @overvenus @BusyJay |
BusyJay
reviewed
May 7, 2019
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
overvenus
reviewed
May 9, 2019
| fn should_write_to_engine(cmd: &RaftCmdRequest, wb_keys: usize) -> bool { | ||
| fn should_write_to_engine(cmd: &RaftCmdRequest, wb_keys: usize, for_merge_source: bool) -> bool { | ||
| if cmd.has_admin_request() { | ||
| match cmd.get_admin_request().get_cmd_type() { |
Member
There was a problem hiding this comment.
Should we guard this check with for_merge_source?
Member
Author
There was a problem hiding this comment.
no, when handle committed entries for merge, it is still possible to handle some admin requests(not in log gap, just not applied in time) that should write to engine.
Signed-off-by: Connor1996 <zbk602423539@gmail.com>
Member
Author
|
/test |
Member
Author
|
PTAL again @BusyJay @overvenus |
overvenus
approved these changes
May 20, 2019
hicqu
approved these changes
May 20, 2019
Merged
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 have you changed? (mandatory)
There are two bugs of #4581 and #4560 in master which fixed by #4595. But release-2.1 doesn't suffer from #4581, and to make changes as less as possible, this PR just write tombstone state with writes in one batch when catching up logs for merge instead of catching up logs through raft.
What are the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
unit-test