Repository: ignite
Updated Branches:
  refs/heads/ignite-1758 ca2155d59 -> a4beb150e


ignite-1758


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

Branch: refs/heads/ignite-1758
Commit: a4beb150ed297370fde24fb156bdb557c4de454f
Parents: ca2155d
Author: sboikov <sboi...@gridgain.com>
Authored: Mon Oct 26 12:03:37 2015 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Mon Oct 26 12:29:16 2015 +0300

----------------------------------------------------------------------
 .../communication/tcp/TcpCommunicationSpi.java  | 25 ++++++++++++--------
 .../ignite/spi/discovery/tcp/ServerImpl.java    |  2 +-
 .../testsuites/IgniteClientNodesTestSuite.java  |  6 -----
 3 files changed, 16 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a4beb150/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 f457269..9b5ddde 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
@@ -61,6 +61,7 @@ import org.apache.ignite.events.Event;
 import org.apache.ignite.internal.IgniteClientDisconnectedCheckedException;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
+import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
 import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
 import org.apache.ignite.internal.util.GridConcurrentFactory;
 import org.apache.ignite.internal.util.GridSpinReadWriteLock;
@@ -1872,25 +1873,25 @@ public class TcpCommunicationSpi extends 
IgniteSpiAdapter
      *
      * @param node Destination node.
      * @param msg Message to send.
-     * @param ackClosure Ack closure.
+     * @param ackC Ack closure.
      * @throws org.apache.ignite.spi.IgniteSpiException Thrown in case of any 
error during sending the message.
      *      Note that this is not guaranteed that failed communication will 
result
      *      in thrown exception as this is dependant on SPI implementation.
      */
-    public void sendMessage(ClusterNode node, Message msg, 
IgniteInClosure<IgniteException> ackClosure)
+    public void sendMessage(ClusterNode node, Message msg, 
IgniteInClosure<IgniteException> ackC)
         throws IgniteSpiException {
-        sendMessage0(node, msg, ackClosure);
+        sendMessage0(node, msg, ackC);
     }
 
     /**
      * @param node Destination node.
      * @param msg Message to send.
-     * @param ackClosure Ack closure.
+     * @param ackC Ack closure.
      * @throws org.apache.ignite.spi.IgniteSpiException Thrown in case of any 
error during sending the message.
      *      Note that this is not guaranteed that failed communication will 
result
      *      in thrown exception as this is dependant on SPI implementation.
      */
-    private void sendMessage0(ClusterNode node, Message msg, 
IgniteInClosure<IgniteException> ackClosure)
+    private void sendMessage0(ClusterNode node, Message msg, 
IgniteInClosure<IgniteException> ackC)
         throws IgniteSpiException {
         assert node != null;
         assert msg != null;
@@ -1898,13 +1899,13 @@ public class TcpCommunicationSpi extends 
IgniteSpiAdapter
         if (log.isTraceEnabled())
             log.trace("Sending message with ack to node [node=" + node + ", 
msg=" + msg + ']');
 
-        ClusterNode localNode = getLocalNode();
+        ClusterNode locNode = getLocalNode();
 
-        if (localNode == null)
+        if (locNode == null)
             throw new IgniteSpiException("Local node has not been started or 
fully initialized " +
                 "[isStopping=" + getSpiContext().isStopping() + ']');
 
-        if (node.id().equals(localNode.id()))
+        if (node.id().equals(locNode.id()))
             notifyListener(node.id(), msg, NOOP);
         else {
             GridCommunicationClient client = null;
@@ -1917,10 +1918,10 @@ public class TcpCommunicationSpi extends 
IgniteSpiAdapter
 
                     UUID nodeId = null;
 
-                    if (!client.async() && 
!localNode.version().equals(node.version()))
+                    if (!client.async() && 
!locNode.version().equals(node.version()))
                         nodeId = node.id();
 
-                    retry = client.sendMessage(nodeId, msg, ackClosure);
+                    retry = client.sendMessage(nodeId, msg, ackC);
 
                     client.release();
 
@@ -2294,6 +2295,10 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                         return null;
                     }
 
+                    if (getSpiContext().node(node.id()) == null)
+                        throw new ClusterTopologyCheckedException("Failed to 
send message, " +
+                            "node left cluster: " + node);
+
                     long rcvCnt = -1;
 
                     SSLEngine sslEngine = null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4beb150/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 6bc0402..6163834 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
@@ -1824,7 +1824,7 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                 if (log.isDebugEnabled()) {
                     if (cp == null)
-                        log.debug("Failed to find messages history [node=" + 
node + ", lastMsgId" + lastMsgId + ']');
+                        log.debug("Failed to find messages history [node=" + 
node + ", lastMsgId=" + lastMsgId + ']');
                     else
                         log.debug("Found messages history [node=" + node + ", 
hist=" + cp + ']');
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4beb150/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java
 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java
index 689097e..0055954 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteClientNodesTestSuite.java
@@ -34,12 +34,6 @@ public class IgniteClientNodesTestSuite extends TestSuite {
     public static TestSuite suite() throws Exception {
         TestSuite suite = new TestSuite("Ignite Client Nodes Reconnect Test 
Suite");
 
-        suite.addTest(IgniteClientReconnectTestSuite.suite());
-
-        suite.addTestSuite(IgniteCacheManyClientsTest.class);
-        suite.addTestSuite(IgniteCacheClientNodeConcurrentStart.class);
-        suite.addTestSuite(IgniteCacheClientReconnectTest.class);
-
         suite.addTestSuite(IgniteClientReconnectMassiveShutdownTest.class);
 
         return suite;

Reply via email to