jchen21 commented on code in PR #7677:
URL: https://github.com/apache/geode/pull/7677#discussion_r870769588


##########
geode-core/src/main/java/org/apache/geode/internal/cache/persistence/PersistenceAdvisorImpl.java:
##########
@@ -1161,11 +1162,19 @@ public void checkInterruptedByShutdownAll() {
 
   @Override
   public void close() {
-    isClosed = true;
-    persistentMemberManager.removeRevocationListener(profileChangeListener);
-    
cacheDistributionAdvisor.removeProfileChangeListener(profileChangeListener);
-    persistentStateListeners = Collections.emptySet();
-    releaseTieLock();
+    try {
+      synchronized (this) {
+        isClosed = true;
+        
persistentMemberManager.removeRevocationListener(profileChangeListener);
+        
cacheDistributionAdvisor.removeProfileChangeListener(profileChangeListener);
+        persistentStateListeners = Collections.emptySet();
+        releaseTieLock();
+      }
+    } catch (CancelException e) {
+      logger.debug("persistence advisor close abridged due to shutdown", e);
+    } catch (Exception ex) {

Review Comment:
   If there is Exception other than `CancelException`, I don't think the 
Exception can be ignored. It should be thrown.



-- 
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-unsubscr...@geode.apache.org

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

Reply via email to