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 2021/02/22 22:48:56 UTC

[GitHub] [geode] kamilla1201 commented on a change in pull request #6037: GEODE-7245: Remove most uses of latestViewReadLock in GMSMembership

kamilla1201 commented on a change in pull request #6037:
URL: https://github.com/apache/geode/pull/6037#discussion_r580648266



##########
File path: geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembership.java
##########
@@ -1360,13 +1319,8 @@ public boolean verifyMember(ID mbr, String reason) {
 
   @Override
   public ID[] getAllMembers(final ID[] arrayType) {
-    latestViewReadLock.lock();
-    try {
-      List<ID> keySet = latestView.getMembers();
-      return keySet.toArray(arrayType);
-    } finally {
-      latestViewReadLock.unlock();
-    }
+    final List<ID> keySet = latestView.getMembers();

Review comment:
       This PR also makes `members` list unmodifiable.




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

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