This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
feat(split): add child copy mutation synchronously #727
Merged
Conversation
This file contains 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
neverchanje
reviewed
Feb 20, 2021
neverchanje
previously approved these changes
Feb 22, 2021
neverchanje
previously approved these changes
Feb 23, 2021
levy5307
reviewed
Feb 24, 2021
levy5307
reviewed
Feb 24, 2021
levy5307
approved these changes
Feb 26, 2021
neverchanje
approved these changes
Feb 26, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 this pull request solves
During partition split, parent partition should send mutation to child partition, child will copy this mutation and prepare it. This pull request is about child partition copying mutations synchronously.(async-learn: #676)
When all child partitions caught up its parent, primary parent will set
sync_send_write_request=true
(#390), then each mutation parent received should wait for child prepare it succeed until this value is false.Difference between normal 2pc and 2pc in sync-learn
Other details
_is_sync_to_child = true
, will be set ininit_prepare
andon_prepare
._wait_child
to avoid secondary parent reply to primary parent without waiting for its child prepare succeed, also avoid primary parent commit without waiting for its child prepare succeed_is_error_acked
to avoid reply twice when secondary partition prepare failed