You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/04/11 12:26:31 UTC

[GitHub] [geode] jdeppe-pivotal opened a new pull request, #7579: GEODE-10161: Remove unnecessary synchronization from RedisList

jdeppe-pivotal opened a new pull request, #7579:
URL: https://github.com/apache/geode/pull/7579

   - Now, with the addition of versioning and synchronization at the
     higher-level methods, all the synchronization can be removed from the
     small, helper methods we have.
   - We still need to ensure that there is synchronization between toData
     and within methods that are mutating the list.
   - Inline various helper methods in RedisList as they are not adding any
     value.
   - Use AvailablePortHelper to set up the port that the crashing VM will
     use. Without this there is interference from other tests when running
     multiple tests concurrently (in the stressTest job).
   - Ran at least 1000 iterations of all list-related DUnit tests without
     any failures.
   
   <!-- Thank you for submitting a contribution to Apache Geode. -->
   
   <!-- In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken: 
   -->
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   <!-- Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   -->
   


-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] jdeppe-pivotal commented on pull request #7579: GEODE-10161: Remove unnecessary synchronization from RedisList

Posted by GitBox <gi...@apache.org>.
jdeppe-pivotal commented on PR #7579:
URL: https://github.com/apache/geode/pull/7579#issuecomment-1102927454

   @DonalEvans I created https://issues.apache.org/jira/browse/GEODE-10244 for the `AbstractRedisData` issue you mentioned.


-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] DonalEvans commented on a diff in pull request #7579: GEODE-10161: Remove unnecessary synchronization from RedisList

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on code in PR #7579:
URL: https://github.com/apache/geode/pull/7579#discussion_r847799209


##########
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:
   This call is not inside a synchronized block but modifies the backing list. Is there a possibility of issues here?



-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] jdeppe-pivotal merged pull request #7579: GEODE-10161: Remove unnecessary synchronization from RedisList

Posted by GitBox <gi...@apache.org>.
jdeppe-pivotal merged PR #7579:
URL: https://github.com/apache/geode/pull/7579


-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [geode] jdeppe-pivotal commented on a diff in pull request #7579: GEODE-10161: Remove unnecessary synchronization from RedisList

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org