DATAREDIS-1190 - Cluster rename now correctly overwrites existing keys.
rename(…) behavior in cluster-mode is now aligned with standalone Redis behavior that overwrites the target key if it already exists and the renamed key uses a different slot. Previously, the underlying restore command was called without the replace option which caused BUSYKEY failures. Original Pull Request: #555
This commit is contained in:
committed by
Christoph Strobl
parent
0929ddbdcd
commit
e37f2f08ee
@@ -270,7 +270,7 @@ class JedisClusterKeyCommands implements RedisKeyCommands {
|
||||
|
||||
if (value != null && value.length > 0) {
|
||||
|
||||
restore(targetKey, 0, value);
|
||||
restore(targetKey, 0, value, true);
|
||||
del(sourceKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class LettuceClusterKeyCommands extends LettuceKeyCommands {
|
||||
|
||||
if (value != null && value.length > 0) {
|
||||
|
||||
restore(targetKey, 0, value);
|
||||
restore(targetKey, 0, value, true);
|
||||
del(sourceKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user