ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [07/50] [abbrv] incubator-ignite git commit: Merge remote-tracking branch 'origin/master'
Date Fri, 31 Jul 2015 06:10:43 GMT
Merge remote-tracking branch 'origin/master'

Conflicts:
	modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java


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

Branch: refs/heads/ignite-843
Commit: e4a7dc5239bf5581af28f5c37438498a17e5d2c6
Parents: 1bc9ad2 cff25e9
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Fri Jul 24 15:48:44 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Fri Jul 24 15:48:44 2015 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |  35 +-
 .../org/apache/ignite/spi/IgniteSpiAdapter.java |  58 +++
 .../spi/IgniteSpiOperationTimeoutException.java |  43 ++
 .../spi/IgniteSpiOperationTimeoutHelper.java    | 102 ++++
 .../communication/tcp/TcpCommunicationSpi.java  | 122 ++++-
 .../ignite/spi/discovery/tcp/ClientImpl.java    |  52 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 509 +++++++++++--------
 .../spi/discovery/tcp/TcpDiscoveryImpl.java     |  11 +-
 .../spi/discovery/tcp/TcpDiscoverySpi.java      | 135 +++--
 .../tcp/internal/TcpDiscoveryNode.java          |  21 +
 .../TcpDiscoveryConnectionCheckMessage.java     |  64 +++
 .../IgniteClientReconnectAbstractTest.java      |   4 +-
 .../GridTcpCommunicationSpiAbstractTest.java    |   2 +-
 ...dTcpCommunicationSpiRecoveryAckSelfTest.java |   3 +-
 ...tionSpiRecoveryFailureDetectionSelfTest.java |  54 ++
 ...GridTcpCommunicationSpiRecoverySelfTest.java |  23 +-
 ...unicationSpiTcpFailureDetectionSelfTest.java |  75 +++
 .../discovery/AbstractDiscoverySelfTest.java    |  23 +-
 ...lientDiscoverySpiFailureTimeoutSelfTest.java | 205 ++++++++
 .../tcp/TcpClientDiscoverySpiSelfTest.java      | 116 +++--
 .../tcp/TcpDiscoverySpiConfigSelfTest.java      |   1 +
 .../TcpDiscoverySpiFailureTimeoutSelfTest.java  | 402 +++++++++++++++
 .../IgniteSpiCommunicationSelfTestSuite.java    |   3 +
 .../IgniteSpiDiscoverySelfTestSuite.java        |   2 +
 24 files changed, 1749 insertions(+), 316 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e4a7dc52/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e4a7dc52/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 35911969,7be1dbc..f76025d
--- 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
@@@ -1964,15 -1971,25 +2007,25 @@@ public class TcpCommunicationSpi extend
              }
  
              try {
-                 safeHandshake(client, null, node.id(), connTimeout0, null);
 -                safeHandshake(client, null, node.id(), timeoutHelper.nextTimeoutChunk(connTimeout0));
++                safeHandshake(client, null, node.id(), timeoutHelper.nextTimeoutChunk(connTimeout0),
null);
              }
-             catch (HandshakeTimeoutException e) {
+             catch (HandshakeTimeoutException | IgniteSpiOperationTimeoutException e) {
+                 client.forceClose();
+ 
+                 if (failureDetectionTimeoutEnabled() && (e instanceof HandshakeTimeoutException
||
+                     timeoutHelper.checkFailureTimeoutReached(e))) {
+                     log.debug("Handshake timed out (failure threshold reached) [failureDetectionTimeout="
+
+                         failureDetectionTimeout() + ", err=" + e.getMessage() + ", client="
+ client + ']');
+ 
+                     throw e;
+                 }
+ 
+                 assert !failureDetectionTimeoutEnabled();
+ 
                  if (log.isDebugEnabled())
-                     log.debug("Handshake timedout (will retry with increased timeout) [timeout="
+ connTimeout0 +
+                     log.debug("Handshake timed out (will retry with increased timeout) [timeout="
+ connTimeout0 +
                          ", err=" + e.getMessage() + ", client=" + client + ']');
  
-                 client.forceClose();
- 
                  if (attempt == reconCnt || connTimeout0 > maxConnTimeout) {
                      if (log.isDebugEnabled())
                          log.debug("Handshake timedout (will stop attempts to perform the
handshake) " +
@@@ -2111,18 -2130,11 +2166,19 @@@
  
                      long rcvCnt = -1;
  
 +                    SSLEngine sslEngine = null;
 +
                      try {
-                         ch.socket().connect(addr, (int)connTimeout);
+                         ch.socket().connect(addr, (int)timeoutHelper.nextTimeoutChunk(connTimeout));
  
 +                        if (isSslEnabled()) {
 +                            sslEngine = ignite.configuration().getSslContextFactory().create().createSSLEngine();
 +
 +                            sslEngine.setUseClientMode(true);
 +                        }
 +
-                         rcvCnt = safeHandshake(ch, recoveryDesc, node.id(), connTimeout0,
sslEngine);
+                         rcvCnt = safeHandshake(ch, recoveryDesc, node.id(),
 -                            timeoutHelper.nextTimeoutChunk(connTimeout0));
++                            timeoutHelper.nextTimeoutChunk(connTimeout0), sslEngine);
  
                          if (rcvCnt == -1)
                              return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e4a7dc52/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e4a7dc52/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e4a7dc52/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e4a7dc52/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java
----------------------------------------------------------------------


Mime
View raw message