You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/11/12 18:37:09 UTC

[GitHub] [geode] echobravopapa commented on a change in pull request #5739: GEODE-8697: Propagate ForcedDisconnectException to the user application

echobravopapa commented on a change in pull request #5739:
URL: https://github.com/apache/geode/pull/5739#discussion_r522303266



##########
File path: geode-dunit/src/main/java/org/apache/geode/test/greplogs/ExpectedStrings.java
##########
@@ -79,6 +79,7 @@ public static boolean skipLogMsgs(String type) {
     expected.add(Pattern.compile("SystemAlertManager: A simple Alert."));
 
     expected.add(Pattern.compile("org.apache.geode.management.DependenciesNotFoundException"));
+    expected.add(Pattern.compile("EntryNotFoundException"));

Review comment:
       How is this connected to this issue?

##########
File path: geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java
##########
@@ -2293,26 +2298,25 @@ public Distribution getDistribution() {
 
     @Override
     public void membershipFailure(String reason, Throwable t) {
-      exceptionInThreads = true;
-      rootCause = t;
-      if (rootCause != null && !(rootCause instanceof ForcedDisconnectException)) {
-        logger.info("cluster membership failed due to ", rootCause);
-        rootCause = new ForcedDisconnectException(rootCause.getMessage());
+      dm.exceptionInThreads = true;
+      Throwable cause = t;
+      if (cause != null && !(cause instanceof ForcedDisconnectException)) {
+        logger.info("cluster membership failed due to ", cause);
+        cause = new ForcedDisconnectException(cause.getMessage());
       }
+      dm.setRootCause(cause);

Review comment:
       this line is the crucial part of the fix, no?

##########
File path: geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java
##########
@@ -2357,9 +2361,9 @@ public void memberDeparted(InternalDistributedMember theId, boolean crashed, Str
           message.setIgnoreAlertListenerRemovalFailure(true); // we don't know if it was a listener
                                                               // so
           // don't issue a warning
-          message.setRecipient(localAddress);
+          message.setRecipient(dm.getDistributionManagerId());
           message.setReason(reason); // added for #37950

Review comment:
       extra credit: could the comment "// added for #37950" be converted into some words; i.e. whatever that old issue was/fixed etc...




----------------------------------------------------------------
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:
users@infra.apache.org