jinmeiliao commented on a change in pull request #7063:
URL: https://github.com/apache/geode/pull/7063#discussion_r745135967



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientUserAuths.java
##########
@@ -199,9 +231,12 @@ public void cleanup(boolean fromCacheClientProxy) {
       }
     }
 
-    // Logout the subjects
-    for (final Long subjectId : uniqueIdVsSubject.keySet()) {
-      removeSubject(subjectId);
+    // for integrated security, doesn't matter if this is called from proxy
+    // or from the connection, we are closing the client connection
+    synchronized (this) {

Review comment:
       We want to prevent multiple threads calling this block of code and 
"removeSubject" at the same time, using concurrent data structure wouldn't 
guarantee that.
   
   if we synchronize on "uniqueIdVsSubjects" here, we can't simply add 
"synchronize" on the other methods, since the other methods are synchronizing 
on the "this" object if we put "synchronize" on the method name.
   




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