jdeppe-pivotal commented on code in PR #7579:
URL: https://github.com/apache/geode/pull/7579#discussion_r853125966


##########
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java:
##########
@@ -265,7 +267,7 @@ public void lset(Region<RedisKey, RedisData> region, 
RedisKey key, int index, by
       throw new RedisException(ERROR_INDEX_OUT_OF_RANGE);
     }
 
-    elementReplace(adjustedIndex, value);
+    elementList.set(adjustedIndex, value);

Review Comment:
   Since we're not updating the `version` here this should be OK. 
Synchronization is implemented to allow atomic updates to both the version and 
the underlying structure. Additionally synchronization also prevents the 
possibility of `ConcurrentModificationException`s which this `set` call won't 
trigger since it's merely changing an existing value and not changing the 
structure (size) of the list.



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