Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic reload duplication config #2102

Open
ninsmiracle opened this issue Aug 19, 2024 · 3 comments
Open

Dynamic reload duplication config #2102

ninsmiracle opened this issue Aug 19, 2024 · 3 comments
Labels
type/enhancement Indicates new feature requests

Comments

@ninsmiracle
Copy link
Contributor

Feature Request

In PR #2000 , we can ignore cluster id with paramater dup_ignore_other_cluster_ids.
However, I think this function can be more flexible.
There is no doubt that, cluster id is very useful in multiple clusters duplication situation, backup-cluster can use it to judge data's priority.
So we may want to dynamic relod duplication config when we doing duplication.

Describe the feature you'd like:
Here is a case:
At beging, we have two clusters like cluster A dup data to cluster B. (A ----> B)
And now, demand changes:
C cluster also need to dup to cluster B. (A,C -----> B)
We don't need to restart the nodes on B, and can reload the config ABOUT DUP.

@acelyc111
Copy link
Member

acelyc111 commented Sep 24, 2024

@ninsmiracle
How many configuration key-value pairs are needed to be reload in this case?

There are several ways to update configs, http and remote_command, it's not a good idea to introduce another method.

@ninsmiracle
Copy link
Contributor Author

ninsmiracle commented Sep 25, 2024

There are 2 key-value paris needed to be reload,such like this:

[[pegasus.clusters]]
   c3tst-cluster1 = 10.xxx.xxx.x:22601,10.xxx.xx.x:22601
   c4tst-cluster2 = 10.xxx.xx.x:37001,10.xxx.xx.x:37001
   # you can add cluster's meta list here
   xxxxx = xxxxxxxxxxxx
   
  [[duplication-group]]
  c3tst-cluster1 = 1 
  c4tst-cluster2 = 2 
 # you can add cluster_id here
  xxxx = 3      

We only need to recognize these two parameters in this issues.

@ninsmiracle
Copy link
Contributor Author

ninsmiracle commented Sep 25, 2024

Regarding the second discussion, I think update the config via http is not a good idea.
Here is the method we used (If we apply this feat):
1.Push new config file (config.ini) with your own method to target cluster.
2.Open pegasus-shell and type remote_command -t all dup-config-reload.
3.Begin duplication as normal. Just like: dup add -c c3tst-cluster3 -p

In step1, we require the cluster maintenance personnel to push the config file to the nodes of the target cluster first. This step is to ensure that the latest config file can be read immediately when the cluster node is restarted after a downtime.

In step2, we can see that we use remote_command to upload the latest config file paramaters (those about duplication) to memory.

So that, in step 3, you can use dup command without restart target cluster's nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants