Kris-10-0 commented on a change in pull request #7507:
URL: https://github.com/apache/geode/pull/7507#discussion_r838877976



##########
File path: 
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java
##########
@@ -221,17 +221,18 @@ public long lpush(ExecutionHandlerContext context, 
List<byte[]> elementsToAdd,
    */
   public int lrem(int count, byte[] element, Region<RedisKey, RedisData> 
region, RedisKey key) {
     List<Integer> removedIndexes;
-    byte version;
+    byte newVersion;
     synchronized (this) {
       removedIndexes = elementList.remove(element, count);
-      version = incrementAndGetVersion();
-    }
+      if (removedIndexes.isEmpty()) {
+        return 0;
+      }
 
-    if (!removedIndexes.isEmpty()) {
-      storeChanges(region, key,
-          new RemoveElementsByIndex(version, removedIndexes));
+      newVersion = incrementAndGetVersion();

Review comment:
       I talked to Wayne and he said typically we would, but since I'm going on 
vacation soon he said it's ok to put this fix in here. If it'll be better in 
the long run to create a ticket, I'll do so and take this out.




-- 
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