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
split: parent replica create child replica #291
Merged
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,
qinzuoyan,
acelyc111,
foreverneverer and
vagetablechicken
August 8, 2019 10:40
src/dist/replication/test/replica_test/unit_test/replica_split_test.cpp
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Aug 13, 2019
neverchanje
reviewed
Aug 13, 2019
src/dist/replication/test/replica_test/unit_test/CMakeLists.txt
Outdated
Show resolved
Hide resolved
neverchanje
reviewed
Aug 13, 2019
neverchanje
reviewed
Aug 13, 2019
neverchanje
reviewed
Aug 17, 2019
neverchanje
reviewed
Aug 17, 2019
neverchanje
reviewed
Aug 20, 2019
vagetablechicken
previously approved these changes
Aug 20, 2019
neverchanje
reviewed
Aug 20, 2019
neverchanje
approved these changes
Aug 21, 2019
vagetablechicken
approved these changes
Aug 21, 2019
This was referenced Aug 21, 2019
Closed
This was referenced Feb 14, 2020
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
This pr solves the third step of partition split, which is bold in process description.
Main logic
on_add_child
- parent replica create child replicacreate_child_replica
- create child instanceinit_child_replica
- child replica initializedMore explanations
replica::newr
andreplica_stub::get_replica_dir
, createreplica_stub::get_child_dir
get_replica_dir
and add functionget_child_dir
to support creating replica under specific dir rather than allocating by _fs_manager.PS_PARTITION_SPLIT
and its context functionPS_PARTITION_SPLIT
partition_split_context
in the pr is incomplete, more varieties and functions will be add in following pull requestsplit_replica_exec
to simplify codeon_add_child
is called during on_config_sync, not in this prTests
on_add_child
init_child_replica
is NOT added in this pr, because currentinit_child_replica
is incomplete