geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [24/50] [abbrv] incubator-geode git commit: GEODE-634 CI failure: DistributedMemberDUnitTest.testRolesInAllVMs
Date Mon, 01 Feb 2016 20:55:41 GMT
GEODE-634 CI failure: DistributedMemberDUnitTest.testRolesInAllVMs

Overriding another JGroups method that sometimes logs errors during
disconnect, causing tests to fail with suspect-strings.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f30e497b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f30e497b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f30e497b

Branch: refs/heads/feature/GEODE-773-2
Commit: f30e497be28946b23e771b58bfb635a339689724
Parents: 0994a45
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Fri Jan 29 09:47:01 2016 -0800
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Fri Jan 29 09:47:01 2016 -0800

----------------------------------------------------------------------
 .../membership/gms/messenger/Transport.java     | 27 +++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f30e497b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
index dfc2d6d..167193f 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
@@ -24,6 +24,7 @@ import java.net.SocketException;
 import org.jgroups.Address;
 import org.jgroups.Message;
 import org.jgroups.protocols.UDP;
+import org.jgroups.util.AsciiString;
 import org.jgroups.util.DefaultThreadFactory;
 import org.jgroups.util.LazyThreadFactory;
 import org.jgroups.util.Util;
@@ -75,7 +76,31 @@ public class Transport extends UDP {
 //        Util.getMessage("SendFailure"),
 //                  local_addr, (dest == null? "cluster" : dest), msg.size(), e.toString(),
msg.printHeaders());
     }
-}
+  }
+
+  /*
+   * (non-Javadoc)
+   * copied from JGroups to perform Geode-specific error handling when there
+   * is a network partition
+   */
+  @Override
+  protected void doSend(AsciiString cluster_name, byte[] buf, int offset, int length, Address
dest) throws Exception {
+    try {
+      super.doSend(cluster_name, buf, offset, length, dest);
+    } catch(SocketException sock_ex) {
+      if (!this.sock.isClosed() && !stack.getChannel().isClosed()) {
+        log.error("Exception caught while sending message", sock_ex);
+      }
+    } catch (IOException e) {
+      if (messenger != null
+          /*&& e.getMessage().contains("Operation not permitted")*/) { // this is
the english Oracle JDK exception condition we really want to catch
+        messenger.handleJGroupsIOException(e, dest);
+      }
+    } catch(Throwable e) {
+        log.error("Exception caught while sending message", e);
+    }
+  }
+
     
   /*
    * (non-Javadoc)


Mime
View raw message