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



##########
File path: 
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisList.java
##########
@@ -61,20 +62,35 @@ public RedisList() {
   }
 
   /**
-   * @param elementsToAdd elements to add to this set; NOTE this list may by 
modified by this call
+   * @param elementsToAdd elements to add to this list; NOTE this list may be 
modified by this call
    * @param region the region this instance is stored in
-   * @param key the name of the set to add to
+   * @param key the name of the list to add to
    * @param onlyIfExists if true then the elements should only be added if the 
key already exists
    *        and holds a list, otherwise no operation is performed.
    * @return the length of the list after the operation
    */
-  public long lpush(List<byte[]> elementsToAdd, Region<RedisKey, RedisData> 
region, RedisKey key,
-      final boolean onlyIfExists) {
-    elementsPush(elementsToAdd);
+  public synchronized long lpush(List<byte[]> elementsToAdd, Region<RedisKey, 
RedisData> region,
+      RedisKey key, final boolean onlyIfExists) {
+    elementsPushHead(elementsToAdd);
     storeChanges(region, key, new AddByteArrays(elementsToAdd));
     return elementList.size();
   }
 
+  /**
+   * @param elementsToAdd elements to add to this list; NOTE this list may be 
modified by this call

Review comment:
       Right - I've removed from `rpush()`, but `lpush()` is being updated in a 
separate PR so I don't want to introduce a conflict there.




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