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



##########
File path: 
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembership.java
##########
@@ -273,6 +273,9 @@ boolean isDistributionMessage() {
   /**
    * Members that have sent a shutdown message. This is used to suppress 
suspect processing that
    * otherwise becomes pretty aggressive when a member is shutting down.
+   *
+   * Accesses to this map should be synchronized on the map to avoid concurrent
+   * modification exceptions

Review comment:
       We could keep the synchronization and improve things a tiny bit by 
declaring the field this way:
   
   ```
     private final Set<ID> shutdownMembers = new 
BoundedLinkedHashMap<ID,ID>().keySet();
   ```
   
   That'd let us `shutdownMembers.put(id)` and use 
`shutdownMembers.contains(id)` instead of `shutdownMembers.containsKey(id)`.




----------------------------------------------------------------
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:
[email protected]


Reply via email to