jmelchio commented on a change in pull request #7116:
URL: https://github.com/apache/geode/pull/7116#discussion_r758481186



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/security/IntegratedSecurityService.java
##########
@@ -119,8 +121,12 @@ public Subject getSubject() {
       }
     }
 
-    // in other cases like rest call, client operations, we get it from the 
current thread
-    currentUser = SecurityUtils.getSubject();
+    try {
+      // in other cases like rest call, client operations, we get it from the 
current thread
+      currentUser = SecurityUtils.getSubject();
+    } catch (UnavailableSecurityManagerException e) {
+      throw new CacheClosedException("likely cache shutdown in progress", e);

Review comment:
       At this point a `cache` object is not in scope and given that the issue 
we're addressing here is related to race conditions with cache requests on the 
one hand, and cache being either gone or in the process of being shut down on 
the other, I don't know if it's worth adding the functionality of bringing it 
in scope and checking its state.




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