You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dg...@apache.org on 2019/01/24 10:02:43 UTC

[ignite] branch master updated: IGNITE-11016 Add lost part of commit

This is an automated email from the ASF dual-hosted git repository.

dgovorukhin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e04c42  IGNITE-11016 Add lost part of commit
4e04c42 is described below

commit 4e04c42503e72695b13c4ea44e4ae7211ffca84c
Author: Pavel Voronkin <pv...@gridgain.com>
AuthorDate: Tue Dec 25 14:01:50 2018 +0300

    IGNITE-11016 Add lost part of commit
---
 .../spi/communication/tcp/TcpCommunicationSpi.java | 70 ++--------------------
 .../ApiParity/TcpCommunicationSpiParityTest.cs     |  5 +-
 2 files changed, 7 insertions(+), 68 deletions(-)

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 2892721..ee2445d 100755
--- 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
@@ -360,12 +360,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter implements Communicati
     /** Default connections per node. */
     public static final int DFLT_CONN_PER_NODE = 1;
 
-    /** Default start delay in case of NEED_WAIT received on handshake, millis. */
-    public static final long DFLT_NEED_WAIT_DELAY = 200;
-
-    /** Default max delay in case of NEED_WAIT received on handshake, millis. */
-    public static final long DFLT_MAX_NEED_WAIT_DELAY = 60_000;
-
     /** No-op runnable. */
     private static final IgniteRunnable NOOP = new IgniteRunnable() {
         @Override public void run() {
@@ -1180,12 +1174,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter implements Communicati
     /** Count of selectors to use in TCP server. */
     private int selectorsCnt = DFLT_SELECTORS_CNT;
 
-    /** Delay on subsequent retry if NEED_WAIT received. */
-    private long needWaitDelay = DFLT_NEED_WAIT_DELAY;
-
-    /** Max value of needWaitDelay. */
-    private long maxNeedWaitDelay = DFLT_MAX_NEED_WAIT_DELAY;
-
     /**
      * Defines how many non-blocking {@code selector.selectNow()} should be made before
      * falling into {@code selector.select(long)} in NIO server. Long value. Default is {@code 0}.
@@ -1886,56 +1874,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter implements Communicati
         return this;
     }
 
-    /**
-     * Get initial needWaitDelay.
-     * @return Initial needWaitDelay.
-     */
-    public long getNeedWaitDelay() {
-        return needWaitDelay;
-    }
-
-    /**
-     * Setting to set start needWaitDelay.
-     * <p>
-     * Configures delay on subsequent reconnect if NEED_WAIT received.
-     * <p>
-     * If not provided, default value is {@link #DFLT_NEED_WAIT_DELAY}.
-     *
-     * @param needWaitDelay Delay between subsequent retries on NEED_WAIT.
-     * @return {@code this} for chaining.
-     */
-    @IgniteSpiConfiguration(optional = true)
-    public TcpCommunicationSpi setNeedWaitDelay(long needWaitDelay) {
-        this.needWaitDelay = needWaitDelay;
-
-        return this;
-    }
-
-    /**
-     * Get max needWaitDelay.
-     * @return Max needWaitDelay.
-     */
-    public long getMaxNeedWaitDelay() {
-        return maxNeedWaitDelay;
-    }
-
-    /**
-     * Setting to set start needWaitDelay.
-     * <p>
-     * Configures max delay on subsequent reconnect if NEED_WAIT received.
-     * <p>
-     * If not provided, default value is {@link #DFLT_MAX_NEED_WAIT_DELAY}.
-     *
-     * @param maxNeedWaitDelay Max delay between subsequent retries on NEED_WAIT.
-     * @return {@code this} for chaining.
-     */
-    @IgniteSpiConfiguration(optional = true)
-    public TcpCommunicationSpi setMaxNeedWaitDelay(long maxNeedWaitDelay) {
-        this.maxNeedWaitDelay = maxNeedWaitDelay;
-
-        return this;
-    }
-
     /** {@inheritDoc} */
     @Override public void setListener(CommunicationListener<Message> lsnr) {
         this.lsnr = lsnr;
@@ -3334,7 +3272,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter implements Communicati
             IgniteSpiOperationTimeoutHelper timeoutHelper = new IgniteSpiOperationTimeoutHelper(this,
                 !node.isClient());
 
-            long needWaitDelay0 = needWaitDelay;
+            long needWaitDelay0 = 200;
 
             while (client == null) { // Reconnection on handshake timeout.
                 if (stopping)
@@ -3447,7 +3385,11 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter implements Communicati
                                 recoveryDesc.release();
 
                             if (needWait) {
-                                if (needWaitDelay0 < maxNeedWaitDelay)
+                                /*
+                                    https://issues.apache.org/jira/browse/IGNITE-7648
+                                    We should add failure detection check here like exception case.
+                                */
+                                if (needWaitDelay0 < 60_000)
                                     needWaitDelay0 *= 2;
 
                                 if (log.isDebugEnabled())
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs
index 5d301cc..be8bd11 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/TcpCommunicationSpiParityTest.cs
@@ -65,10 +65,7 @@ namespace Apache.Ignite.Core.Tests.ApiParity
         };
 
         /** Properties that are missing on .NET side. */
-        private static readonly string[] MissingProperties = {
-            "NeedWaitDelay", // IGNITE-11026
-            "MaxNeedWaitDelay" // IGNITE-11026
-        };
+        private static readonly string[] MissingProperties = {};
 
         /// <summary>
         /// Tests the cache configuration parity.