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-901
Date Mon, 13 Jul 2015 09:24:59 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-901 ee6eea710 -> d8894f7e9


# ignite-901


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

Branch: refs/heads/ignite-901
Commit: d8894f7e964329498195060518f77c5f82f1e6fc
Parents: ee6eea7
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jul 13 12:24:51 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jul 13 12:24:51 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/spi/discovery/tcp/ClientImpl.java | 16 ----------------
 .../apache/ignite/spi/discovery/tcp/ServerImpl.java |  8 +++++---
 .../ignite/spi/discovery/tcp/TcpDiscoveryImpl.java  |  7 +++++++
 .../ignite/spi/discovery/tcp/TcpDiscoverySpi.java   |  5 +++++
 4 files changed, 17 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8894f7e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
index cad5435..1abc4fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java
@@ -988,8 +988,6 @@ class ClientImpl extends TcpDiscoveryImpl {
 
             long timeout = join ? spi.joinTimeout : spi.netTimeout;
 
-            log.info("Will try to reconnect with timeout: " + timeout);
-
             long startTime = U.currentTimeMillis();
 
             try {
@@ -1033,8 +1031,6 @@ class ClientImpl extends TcpDiscoveryImpl {
                                 TcpDiscoveryClientReconnectMessage res = (TcpDiscoveryClientReconnectMessage)msg;
 
                                 if (res.creatorNodeId().equals(getLocalNodeId())) {
-                                    log.info("Reconnect status: " + res.success());
-
                                     if (res.success()) {
                                         msgWorker.addMessage(res);
 
@@ -1151,8 +1147,6 @@ class ClientImpl extends TcpDiscoveryImpl {
                             break;
                         }
                         else if (state == DISCONNECTED) {
-                            log.info("Rejoin timeout, will segment.");
-
                             state = SEGMENTED;
 
                             notifyDiscovery(EVT_NODE_SEGMENTED, topVer, locNode, allVisibleNodes());
@@ -1189,8 +1183,6 @@ class ClientImpl extends TcpDiscoveryImpl {
                                 }
                             }
                             else {
-                                log.info("Socket closed, will try to reconnect.");
-
                                 assert reconnector == null;
 
                                 final Reconnector reconnector = new Reconnector(join);
@@ -1207,16 +1199,12 @@ class ClientImpl extends TcpDiscoveryImpl {
 
                         if (spi.isClientReconnectDisabled()) {
                             if (state != SEGMENTED && state != STOPPED) {
-                                log.info("Reconnected failed, will segment.");
-
                                 state = SEGMENTED;
 
                                 notifyDiscovery(EVT_NODE_SEGMENTED, topVer, locNode, allVisibleNodes());
                             }
                         }
                         else {
-                            log.info("Reconnected failed, will try join.");
-
                             if (state == STARTING || state == CONNECTED) {
                                 state = DISCONNECTED;
 
@@ -1299,8 +1287,6 @@ class ClientImpl extends TcpDiscoveryImpl {
 
             boolean join = state == STARTING;
 
-            log.info("Try join topology with timeout: " + spi.joinTimeout);
-
             joinCnt++;
 
             final Socket sock = joinTopology(false, spi.joinTimeout);
@@ -1309,8 +1295,6 @@ class ClientImpl extends TcpDiscoveryImpl {
                 if (join)
                     joinError(new IgniteSpiException("Join process timed out."));
                 else {
-                    log.info("Send join request on rejoin failed, will segment.");
-
                     state = SEGMENTED;
 
                     notifyDiscovery(EVT_NODE_SEGMENTED, topVer, locNode, allVisibleNodes());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8894f7e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index d51293e..39dbd68 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -1447,6 +1447,8 @@ class ServerImpl extends TcpDiscoveryImpl {
             if (log.isDebugEnabled())
                 log.debug("Heartbeats sender has been started.");
 
+            UUID nodeId = getConfiguredNodeId();
+
             while (!isInterrupted()) {
                 if (spiStateCopy() != CONNECTED) {
                     if (log.isDebugEnabled())
@@ -1455,7 +1457,7 @@ class ServerImpl extends TcpDiscoveryImpl {
                     return;
                 }
 
-                TcpDiscoveryHeartbeatMessage msg = new TcpDiscoveryHeartbeatMessage(getLocalNodeId());
+                TcpDiscoveryHeartbeatMessage msg = new TcpDiscoveryHeartbeatMessage(nodeId);
 
                 msg.verify(getLocalNodeId());
 
@@ -4077,7 +4079,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 
         /** {@inheritDoc} */
         @Override protected void body() throws InterruptedException {
-            UUID locNodeId = getLocalNodeId();
+            UUID locNodeId = getConfiguredNodeId();
 
             ClientMessageWorker clientMsgWrk = null;
 
@@ -4829,7 +4831,7 @@ class ServerImpl extends TcpDiscoveryImpl {
         /** {@inheritDoc} */
         @Override protected void body() throws InterruptedException {
             if (log.isDebugEnabled())
-                log.debug("Message worker started [locNodeId=" + getLocalNodeId() + ']');
+                log.debug("Message worker started [locNodeId=" + getConfiguredNodeId() +
']');
 
             while (!isInterrupted()) {
                 TcpDiscoveryAbstractMessage msg = queue.poll(2000, TimeUnit.MILLISECONDS);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8894f7e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
index 4cb0b8d..c271b7c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryImpl.java
@@ -116,6 +116,13 @@ abstract class TcpDiscoveryImpl {
     }
 
     /**
+     * @return Configured node ID (actual node ID can be different if client reconnects).
+     */
+    public UUID getConfiguredNodeId() {
+        return spi.cfgNodeId;
+    }
+
+    /**
      * @param msg Error message.
      * @param e Exception.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d8894f7e/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 1f5852c..431d198 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
@@ -260,6 +260,9 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     /** Local node. */
     protected TcpDiscoveryNode locNode;
 
+    /** */
+    protected UUID cfgNodeId;
+
     /** Local host. */
     protected InetAddress locHost;
 
@@ -1641,6 +1644,8 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
                 mcastIpFinder.setLocalAddress(locAddr);
         }
 
+        cfgNodeId = ignite.configuration().getNodeId();
+
         impl.spiStart(gridName);
     }
 


Mime
View raw message