ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: ignite-752: bugs fixing
Date Thu, 02 Jul 2015 07:51:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-752 dd076a089 -> 22ee6e858


ignite-752: bugs fixing


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

Branch: refs/heads/ignite-752
Commit: 22ee6e858c7e1dbd897b0b100c86dd4293a4471f
Parents: dd076a0
Author: Denis Magda <dmagda@gridgain.com>
Authored: Thu Jul 2 10:51:35 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Thu Jul 2 10:51:35 2015 +0300

----------------------------------------------------------------------
 .../spi/communication/tcp/TcpCommunicationSpi.java       | 11 +++++++----
 .../apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22ee6e85/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index bf3fa46..05bb951 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -180,7 +180,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     public static final int DFLT_MSG_QUEUE_LIMIT = GridNioServer.DFLT_SEND_QUEUE_LIMIT;
 
     /** Default max connection timeout can't be bigger than this value. */
-    public static final long DFLT_MAX_CONN_TIMEOUT_LIMIT = 20000;
+    public static final long DFLT_MAX_CONN_TIMEOUT_LIMIT = 30000;
 
     /**
      * Default count of selectors for TCP server equals to
@@ -989,7 +989,9 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * {@code 0} is interpreted as infinite timeout.
      * <p>
      * If not provided, default value is calculated in a way that connection timeout will
be doubled and used at least
-     * four times before failing.
+     * four times before failing. The default value, calculated this way, may be corrected
to be no bigger than
+     * {@link #DFLT_MAX_CONN_TIMEOUT_LIMIT}. If {@link #DFLT_MAX_CONN_TIMEOUT_LIMIT} is smaller
than connect
+     * timeout than max connect timeout will be set to some value bigger than connect timeout.
      *
      * @param maxConnTimeout Maximum connect timeout.
      */
@@ -2369,10 +2371,11 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      * @return Max connect timeout.
      */
     private long defaultMaxConnectTimeout() {
-        long maxTimeout = getConnectTimeout() * (1 << 4);
+        long connTimeout = getConnectTimeout();
+        long maxTimeout = connTimeout * (1 << 4);
 
         if (maxTimeout > DFLT_MAX_CONN_TIMEOUT_LIMIT)
-            maxTimeout = DFLT_MAX_CONN_TIMEOUT_LIMIT;
+            maxTimeout = DFLT_MAX_CONN_TIMEOUT_LIMIT > connTimeout ? DFLT_MAX_CONN_TIMEOUT_LIMIT
: connTimeout * 2;
 
         return maxTimeout;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/22ee6e85/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index bfab4ce..e1e8d0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -194,7 +194,7 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     public static final long DFLT_STATS_PRINT_FREQ = 0;
 
     /** Default max ack timeout can't be bigger than this value. */
-    public static final long DFLT_MAX_ACK_TIMEOUT_LIMIT = 20000;
+    public static final long DFLT_MAX_ACK_TIMEOUT_LIMIT = 30000;
 
     /** Local address. */
     protected String locAddr;
@@ -502,7 +502,9 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
      * is reached, then the process of message sending is considered as failed.
      * <p>
      * If not specified, default is calculated in a way that message acknowledgement timeout
will be doubled and used
-     * at least four times before failing and must be no bigger than {@link #DFLT_MAX_ACK_TIMEOUT_LIMIT}.
+     * at least four times before failing. The default value, calculated this way, may be
corrected to be no bigger than
+     * {@link #DFLT_MAX_ACK_TIMEOUT_LIMIT}. If {@link #DFLT_MAX_ACK_TIMEOUT_LIMIT} is smaller
than acknowledgement
+     * timeout than max acknowledgement timeout will be set to some value bigger than acknowledgement
timeout.
      * <p>
      * Affected server nodes only.
      *
@@ -1782,10 +1784,11 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
      * @return Max acknowledgement timeout.
      */
     private long defaultMaxAckTimeout() {
-        long maxAck = getAckTimeout() * (1 << 4);
+        long ackTimeout = getAckTimeout();
+        long maxAck = ackTimeout * (1 << 4);
 
         if (maxAck > DFLT_MAX_ACK_TIMEOUT_LIMIT)
-            maxAck = DFLT_MAX_ACK_TIMEOUT_LIMIT;
+            maxAck = DFLT_MAX_ACK_TIMEOUT_LIMIT > ackTimeout ? DFLT_MAX_ACK_TIMEOUT_LIMIT
: ackTimeout * 2;
 
         return maxAck;
     }


Mime
View raw message