geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jche...@apache.org
Subject incubator-geode git commit: Set TCP_NODELAY flag to help avoid delay in membership final check
Date Tue, 22 Dec 2015 00:38:45 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 4630e2ef4 -> 625ea36a1


Set TCP_NODELAY flag to help avoid delay in membership final check


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

Branch: refs/heads/develop
Commit: 625ea36a18cb2587d5b98ed673286d8d0d351de6
Parents: 4630e2e
Author: Jianxia Chen <jchen@pivotal.io>
Authored: Mon Dec 21 16:24:24 2015 -0800
Committer: Jianxia Chen <jchen@pivotal.io>
Committed: Mon Dec 21 16:37:53 2015 -0800

----------------------------------------------------------------------
 .../distributed/internal/membership/gms/fd/GMSHealthMonitor.java   | 2 ++
 .../gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/625ea36a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 33c7e76..005b0ed 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -274,6 +274,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler
{
 
     public void run() {
       try {
+        socket.setTcpNoDelay(true);
         DataInputStream in = new DataInputStream(socket.getInputStream());
         OutputStream out = socket.getOutputStream();
         @SuppressWarnings("unused")
@@ -473,6 +474,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler
{
       logger.debug("Checking member {} with TCP socket connection {}:{}.", suspectMember,
suspectMember.getInetAddress(), port);
       clientSocket = SocketCreator.getDefaultInstance().connect(suspectMember.getInetAddress(),
port,
           (int)memberTimeout, new ConnectTimeoutTask(services.getTimer(), memberTimeout),
false, -1, false);
+      clientSocket.setTcpNoDelay(true);
       return doTCPCheckMember(suspectMember, clientSocket);
     }
     catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/625ea36a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
index 8b9347e..47f50b3 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
@@ -110,7 +110,7 @@ public class TcpClient {
     long giveupTime = System.currentTimeMillis() + timeout;
     
     // Get the GemFire version of the TcpServer first, before sending any other request.
-    short serverVersion = getServerVersion(ipAddr, timeout/2).shortValue();
+    short serverVersion = getServerVersion(ipAddr, timeout).shortValue();
 
     if (serverVersion > Version.CURRENT_ORDINAL) {
       serverVersion = Version.CURRENT_ORDINAL;


Mime
View raw message