jinmeiliao commented on code in PR #7677:
URL: https://github.com/apache/geode/pull/7677#discussion_r871791382
##########
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:
as we are in the cleanup phase, if we throw the exception, the rest of the
cleanup will be skipped, which is not what we want. This behavior is consistent
with other advisor close method in the `DistributedRegion`, as in
DLockService.close and `DistributionAdvisor.close`
--
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]