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
ddl_client: add duplication related commands #235
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
neverchanje
requested review from
qinzuoyan,
acelyc111,
hycdong,
zhangyifan27,
foreverneverer,
vagetablechicken and
mentoswang
March 20, 2019 13:40
hycdong
reviewed
Mar 25, 2019
hycdong
previously approved these changes
Mar 25, 2019
acelyc111
reviewed
Mar 26, 2019
cluster.data()); | ||
_group.emplace(cluster, static_cast<uint8_t>(cluster_id)); | ||
} | ||
dassert_f(clusters.size() == _group.size(), |
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.
独立集群(一个group里面只有一个cluster)的情况, 这里会fail掉吗?
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.
这里check的是配置错误
[duplication-group]
c3srv-ai=1
c3srv-ai=3
这种就 fail 掉,测试了,只有一个 cluster 不会fail
acelyc111
approved these changes
Mar 26, 2019
hycdong
approved these changes
Mar 26, 2019
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.
This PR added these 3 ddl commands: add_dup, query_dup, change_dup_status, as well several utilities reside in
duplication_common.h/cpp
.To configure a remote cluster for duplication, users need to set a unique "cluster_id" for it under ' [duplication-group]' section:
The mapping of "cluster_name" to "cluster_id" is stored internally in class
duplication_group_registry
, which is a singleton. The implementation is hiding behind the pure function APIs to make our header more cleaner.