RedisShake icon indicating copy to clipboard operation
RedisShake copied to clipboard

How to know when is the sync-up done?

Open ayasha05 opened this issue 2 years ago • 5 comments

Even the sync-up is done it continuously go on, so what is the way to determine that the sync-up is done and make the code stop from that point of time? If we have three masters so we will have to syncup to each master individually or we provide all IPs at one place using commas as we used to do in older version?

ayasha05 avatar Aug 01 '22 04:08 ayasha05

  1. Send info replication to master node, and check the master_repl_offset and the offset in slaveXXX .
  2. Yes, currently need to do this. There may be improvements in future versions, possibly a helper script.

suxb201 avatar Aug 02 '22 06:08 suxb201

@suxb201 :

  1. Thanks for the input, don’t we have this already handled in the code to stop it, since i see it always running?
  2. What if we have different no of masters in the source and destination cluster, will it not be that some masters has to have more no of keys then?

ayasha05 avatar Aug 02 '22 08:08 ayasha05

@ayasha05

  1. Some users will have write traffic all the time, and they may want to use redis-shake to continuously synchronize data.
  2. The number of redis-shake you start should be the same as the number of nodes on the source cluster. Each redis-shake could send commands to all destination nodes, according to the key distribution rules of redis. https://redis.io/docs/reference/cluster-spec/#key-distribution-model

suxb201 avatar Aug 02 '22 09:08 suxb201

@suxb201 : Thanks for the quick response!!

  1. So I can stop the process once the rdb file sync-up is done?
  2. I just used redis-shake with 3 master-slave configuration and tried to put 1 master for slave and other regions 1 master for target, but I don’t see that all the destination masters has distributed data, the data was only copied in one of the master and two master were blank, though I also thought the approach you mentioned should work that it will equally make the slot according to no of master in destination but it was not like that, have i missed some configuration ?

ayasha05 avatar Aug 02 '22 09:08 ayasha05

@ayasha05

  1. Yes.
  2. Maybe you have the same number of source clusters as your destination clusters, so their slot distributions are the same, so one node's data will only be sent to one node.

suxb201 avatar Aug 03 '22 01:08 suxb201