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): add query_child_state rpc #762
Merged
foreverneverer
merged 5 commits into
XiaoMi:master
from
hycdong:replica_failover_2_query_child
Mar 10, 2021
Merged
feat(split): add query_child_state rpc #762
foreverneverer
merged 5 commits into
XiaoMi:master
from
hycdong:replica_failover_2_query_child
Mar 10, 2021
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
changed the title
feat(split): add query_child_stat rpc
feat(split): add query_child_state rpc
Mar 8, 2021
neverchanje
reviewed
Mar 8, 2021
levy5307
reviewed
Mar 9, 2021
std::placeholders::_1, | ||
response.child_config)); | ||
update_local_partition_count(response.partition_count); | ||
_replica->_primary_states.cleanup_split_states(); |
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.
What about move _replica->_primary_states.cleanup_split_states();
into parent_cleanup_split_context();
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.
It is a good recommend~ Actually, I will refactor it after I merge all function pull requests.
neverchanje
approved these changes
Mar 9, 2021
foreverneverer
approved these changes
Mar 10, 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.
When partition split starts, meta server will transfer split_status and partition_count through
on_config_sync
to replica server.When
meta partition_count = replica paritition_count * 2
, primary parent replica will do different things according to meta_split_status:meta_split_status = SPLITTING
: start splitmeta_split_status = PAUSING
ormeta_split_status = CANCELING
: pause or cancel splitmeta_split_status = PAUSING
: split has been pausedmeta_split_status = NOT_SPLIT
: this pr solvedThis pull request is solve lastest case (meta partition_count = replica paritition_count * 2 && meta_split_status = NOT_SPLIT), there will be two cases:
As above cases show, primary parent partition can not distinguish different cases, it should send a query request to meta server called
query_child_state