`rmt -r` does not work in versions prior to Redis 3.0
Closed this issue ยท 4 comments
tao12345666333 commented
The RESTORE
command add in Redis 2.6, REPLACE
option add in Redis 3.0.
If we use rmt -r
in versions prior to Redis 3.0, it doesn't work fine.
if (!replace) {
endpoint.get().batch(flush, RESTORE, dkv.getKey(), expire, dkv.getValue());
} else {
endpoint.get().batch(flush, RESTORE, dkv.getKey(), expire, dkv.getValue(), REPLACE);
}
Should we replace the implementation of Replace with Lua?
leonchen83 commented
LGTM
I will fix this issue this weekend. Thx to report
leonchen83 commented
Hi @tao12345666333
The work around about this issue is add additional parameter in rmt
like following
rmt -s redis://120.0.0.1:6379 -m redis://127.0.0.1:6380 -r --legacy
means using lua script to migrate data to target redis < 3.0
Migrate data to cluster no need to add this parameter. because cluster's redis version >= 3.0
tao12345666333 commented
Thanks, I will test next week. ๐
leonchen83 commented
Fixed