feat(duplication): add options to support cluster name only used for duplication and allow any other cluster id except myself to be ignored #2000
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.
The purpose of this PR is to optimize configurations for duplications.
Firstly, many Pegasus clusters are configured with the same
cluster_name
(namely
[replication]cluster_name
). However, once we decide to duplicatetables between them, their
cluster_name
have to be changed to be distinguishedfrom each other -- this might lead to side effects.
Secondly, consider a scenario where many clusters are duplicated to a target
cluster. This means we have to add many cluster ids to the
*.ini
file of the targetcluster, and the target cluster might be restarted very frequently.
Thus following options are added to solve both problems:
[replication]dup_cluster_name
is added only for duplication in casecluster_name
has to be changed, while
[replication]dup_ignore_other_cluster_ids
is added so thatonly the target cluster id should be configured and there is no need to add any other
cluster id.