redis / riot

🧨 Get data in & out of Redis with RIOT

Home Page:http://redis.github.io/riot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to stop the live replication without using "--idle-timeout" option?

sarathyg opened this issue Β· comments

We are doing live migration using this tool and need clarification on below questions

  1. How to stop the live replication (MODE = LIVE) without using "--idle-timeout" option?
  2. While doing live migration, if we encounter an error, whether we need to restart the process from beginning or whether it can resume from the point it encountered the error?
  3. How to do verification step separately?
  1. You can just stop the process (kill or ctrl-C)
  2. No there's no way to resume, you have to start from the beginning
  3. Use the compare command (riot-redis compare --help

Thanks for the clarification. I am testing the compare command using couple of test cases and here are my observation. Please let me know your comments.

Test case 1:
Stopped the replication and then deleted one key from the source which is not replicated to the target. Below is the result it gave for compare command

./riot-redis -h "source host" -p "source port" -a "password" compare -h "target host" -p "target port" --tls --show-diffs

Verifying 98% β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Žβ”‚ 2200/2226 (0:00:00 / 0:00:00) ?/s >0 T0 β‰ 0 β§—0 <0
Verifying 100% β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚ 2249/2249 (0:00:01 / 0:00:00) 2249.0/s >0 T0 β‰ 0 β§—0 <0

In this case, source have 2249 keys whereas target have 2250 keys. But compare command didn't show up the difference. I was expecting "<" to show 1 key

Test case 2:
Stopped the replication and then modified one key from the source which is not replicated to the target. Below is the result it gave for compare command

./riot-redis -h "source host" -p "source port" -a "password" compare -h "target host" -p "target port" --tls --show-diffs

Verifying 29% β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Œ β”‚ 650/2204 (0:00:00 / 0:00:01) ?/s >0 T0 β‰ 0 β§—0 <0
Verifying 100% β”‚β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ”‚ 2249/2249 (0:00:01 / 0:00:00) 2249.0/s >0 T0 β‰ 1 β§—0 <0

Verification failed: identical=2248, missing=0, extraneous=0, values=1, ttls=0, types=0

In this case, it rightly pointed out the difference, but it didn't give enough details about which key is having the difference even with "--show-diffs" option

I made some improvements to the comparison output. Can you give the latest early-access release a try?