jdeppe-pivotal commented on a change in pull request #6686:
URL: https://github.com/apache/geode/pull/6686#discussion_r669773274



##########
File path: 
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisKeyCommandsFunctionExecutor.java
##########
@@ -136,7 +136,11 @@ public void restore(RedisKey key, long ttl, byte[] data, 
RestoreOptions options)
   @Override
   public boolean rename(RedisKey oldKey, RedisKey newKey) {
     List<RedisKey> orderedKeys = orderForLocking(oldKey, newKey);
-    return stripedExecute(orderedKeys.get(0), () -> 
rename0(orderedKeys.get(1), oldKey, newKey));
+    return stripedExecute(orderedKeys.get(0), () -> {
+      // Trigger MOVED if necessary
+      getRedisData(newKey);

Review comment:
       `stripedExecute` calls `PartitionedRegion.computeWithPrimaryLocked` with 
the lambda defined here so the bucket shouldn't be able to move as part of this 
execution sequence.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to