ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/43] incubator-ignite git commit: IGNITE-714 - Fixes after review
Date Wed, 15 Apr 2015 13:15:41 GMT
IGNITE-714 - Fixes after review


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

Branch: refs/heads/ignite-737
Commit: 877562d02f90ed4b88d9955954b47aea9b713ae0
Parents: e87ad41
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Fri Apr 10 00:48:08 2015 -0700
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Fri Apr 10 00:48:08 2015 -0700

----------------------------------------------------------------------
 .../ignite/spi/communication/tcp/TcpCommunicationSpi.java   | 8 ++++----
 .../ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java     | 9 ++++++++-
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/877562d0/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 053f121..1b0294e 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
@@ -258,11 +258,9 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                         rmv.forceClose();
 
                         if (!isNodeStopping()) {
-                            boolean failed = getSpiContext().tryFailNode(id);
-
-                            if (!failed) {
-                                GridNioRecoveryDescriptor recoveryData = ses.recoveryDescriptor();
+                            GridNioRecoveryDescriptor recoveryData = ses.recoveryDescriptor();
 
+                            if (!getSpiContext().tryFailNode(id)) {
                                 if (recoveryData != null) {
                                     if (recoveryData.nodeAlive(getSpiContext().node(id)))
{
                                         if (!recoveryData.messagesFutures().isEmpty()) {
@@ -277,6 +275,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                                         recoveryData.onNodeLeft();
                                 }
                             }
+                            else
+                                recoveryData.onNodeLeft();
                         }
                     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/877562d0/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
index 5d24b46..bfa0102 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpi.java
@@ -381,7 +381,14 @@ public class TcpClientDiscoverySpi extends TcpDiscoverySpiAdapter implements
Tcp
 
     /** {@inheritDoc} */
     @Override public void failNode(UUID nodeId) {
-        // No-op.
+        ClusterNode node = rmtNodes.get(nodeId);
+
+        if (node != null) {
+            TcpDiscoveryNodeFailedMessage msg = new TcpDiscoveryNodeFailedMessage(getLocalNodeId(),
+                node.id(), node.order());
+
+            sockRdr.addMessage(msg);
+        }
     }
 
     /**


Mime
View raw message