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 58
feat(split): child replica apply private logs, in-memory mutations and catch up parent #319
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
hycdong
requested review from
neverchanje,
acelyc111,
levy5307,
qinzuoyan,
foreverneverer and
vagetablechicken
September 23, 2019 03:21
vagetablechicken
previously approved these changes
Sep 24, 2019
levy5307
reviewed
Jan 6, 2020
neverchanje
reviewed
Jan 13, 2020
src/dist/replication/test/replica_test/unit_test/replica_split_test.cpp
Outdated
Show resolved
Hide resolved
src/dist/replication/test/replica_test/unit_test/replica_split_test.cpp
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Feb 14, 2020
LPC_CATCHUP_WITH_PRIVATE_LOGS, | ||
tracker(), | ||
[this]() { | ||
catch_up_with_private_logs(partition_status::PS_PARTITION_SPLIT); |
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.
catch_up_with_private_logs 后续 PR 建议改个名字,这个函数和 child_apply_private_logs 对代码不熟悉的很容易看混,而且不明其意
neverchanje
previously approved these changes
Feb 14, 2020
This was referenced Feb 14, 2020
acelyc111
reviewed
Feb 18, 2020
acelyc111
approved these changes
Feb 18, 2020
neverchanje
approved these changes
Feb 18, 2020
neverchanje
pushed a commit
that referenced
this pull request
Mar 31, 2020
…d catch up parent (#319)
This was referenced Oct 28, 2020
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.
Simple partition split process
More partition split discussion in issue #69 and partition split design doc
This pr solves the part of fifth step of partition split, which is bold in process description.
What this pr solved
child_apply_private_logs
apply_learned_state_from_private_log
during learnchild_catch_up_states
init_learn
with learner_statusLearningWithPrepare
goal_decree
, andlocal_decree
is child local last_committed_decree which is the last decree in async-learn.local_decree < goal_decree
, it means there are mutations written to parent during async-learn, child does not catch up parent, there are still some mutations child not learn.local_decree >= _prepare_list->min_decree()
, it means all missing mutations are all in prepare list, otherwise, some missing mutations have already in private log, should callcatch_up_with_private_logs
to catch up all missing mutationsis_caught_up
flag for partition_split context to identify if child catch up parentTests
child_learn_states
child_apply_private_logs
andchild_catch_up