ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [44/50] incubator-ignite git commit: ignite-882: test messages
Date Fri, 03 Jul 2015 09:36:55 GMT
ignite-882: test messages


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

Branch: refs/heads/ignite-882
Commit: aa9868864ac3f0acfa213cfa856555febf770949
Parents: 495d611
Author: Denis Magda <dmagda@gridgain.com>
Authored: Thu Jul 2 15:43:39 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Thu Jul 2 15:43:39 2015 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ServerImpl.java      | 18 +++++++++++++++---
 .../discovery/tcp/internal/TcpDiscoveryNode.java  |  4 ----
 .../TcpDiscoveryNodeAddFinishedMessage.java       |  2 ++
 .../messages/TcpDiscoveryNodeFailedMessage.java   |  2 ++
 .../junits/logger/GridTestLog4jLogger.java        |  6 ++----
 5 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa986886/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 94a2290..3b3c328 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
@@ -710,12 +710,18 @@ class ServerImpl extends TcpDiscoveryImpl {
                         "[locNodeAddrs=" + U.addressesAsString(locNode) + ", rmtNodeAddrs="
+
                         U.addressesAsString(msg.addresses(), msg.hostNames()) + ']');
                 }
-                else
+                else {
+                    U.debug("STATE: " + spiState);
+
                     LT.warn(log, null, "Node has not been connected to topology and will
repeat join process. " +
                         "Check remote nodes logs for possible error messages. " +
                         "Note that large topology may require significant time to start.
" +
                         "Increase 'TcpDiscoverySpi.networkTimeout' configuration property
" +
                         "if getting this message on the starting nodes [networkTimeout="
+ spi.netTimeout + ']');
+
+
+                    U.dumpStack("HALF-OPENED SOCKET PROBLEM");
+                }
             }
         }
 
@@ -4239,8 +4245,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                         msg.senderNodeId(nodeId);
 
-                        if (log.isDebugEnabled())
-                            log.debug("Message has been received: " + msg);
+//                        if (log.isDebugEnabled())
+                            U.debug("Message has been received: " + msg + " NODE " + nodeId);
 
                         spi.stats.onMessageReceived(msg);
 
@@ -4516,6 +4522,7 @@ class ServerImpl extends TcpDiscoveryImpl {
             if (state == CONNECTED) {
                 spi.writeToSocket(msg, sock, RES_OK);
 
+                U.debug("Responded (1) to join request message [msg=" + msg + ", res=" +
RES_OK + ']');
                 if (log.isDebugEnabled())
                     log.debug("Responded to join request message [msg=" + msg + ", res="
+ RES_OK + ']');
 
@@ -4550,6 +4557,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                 spi.writeToSocket(msg, sock, res);
 
+                U.debug("Responded (2) to join request message [msg=" + msg + ", res=" +
res + ']');
+
                 if (log.isDebugEnabled())
                     log.debug("Responded to join request message [msg=" + msg + ", res="
+ res + ']');
 
@@ -4820,6 +4829,9 @@ class ServerImpl extends TcpDiscoveryImpl {
          * @param msg Message to add.
          */
         void addMessage(TcpDiscoveryAbstractMessage msg) {
+            if (msg instanceof TcpDiscoveryNodeAddFinishedMessage)
+                U.dumpStack("Putting add finished to queue: " + msg);
+
             if (msg.highPriority())
                 queue.addFirst(msg);
             else

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa986886/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
index ef2a3b3..36ae39e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java
@@ -154,8 +154,6 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements
Cluste
         metrics = metricsProvider.metrics();
         cacheMetrics = metricsProvider.cacheMetrics();
         sockAddrs = U.toSocketAddresses(this, discPort);
-
-        U.dumpStack("Created NODE: " + id);
     }
 
     /**
@@ -305,8 +303,6 @@ public class TcpDiscoveryNode extends GridMetadataAwareAdapter implements
Cluste
         assert order >= 0 : "Order is invalid: " + this;
 
         this.order = order;
-
-        U.dumpStack("Changed order for node: [node=" + id + ", order=" + order +']');
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa986886/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeAddFinishedMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeAddFinishedMessage.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeAddFinishedMessage.java
index 1d974e1..d93268c 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeAddFinishedMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeAddFinishedMessage.java
@@ -55,6 +55,8 @@ public class TcpDiscoveryNodeAddFinishedMessage extends TcpDiscoveryAbstractMess
     public TcpDiscoveryNodeAddFinishedMessage(UUID creatorNodeId, UUID nodeId) {
         super(creatorNodeId);
 
+        U.dumpStack("NODE ADD FINISHED MESS: " + creatorNodeId + ", node = " + nodeId);
+
         this.nodeId = nodeId;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa986886/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeFailedMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeFailedMessage.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeFailedMessage.java
index 93ecdaa..7c3a5b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeFailedMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeFailedMessage.java
@@ -51,6 +51,8 @@ public class TcpDiscoveryNodeFailedMessage extends TcpDiscoveryAbstractMessage
{
     public TcpDiscoveryNodeFailedMessage(UUID creatorNodeId, UUID failedNodeId, long order)
{
         super(creatorNodeId);
 
+        U.dumpStack("Node Failed Event: [creator=" + creatorNodeId + ", failedNode=" + failedNodeId
+ ", order=" + order + "]");
+
         assert failedNodeId != null;
         assert order > 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa986886/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
index 8f45062..76c5a4e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
@@ -120,7 +120,7 @@ public class GridTestLog4jLogger implements IgniteLogger, LoggerNodeIdAware
{
 
         if (init) {
             // Implementation has already been inited, passing NULL.
-            addConsoleAppenderIfNeeded(Level.INFO, null);
+            addConsoleAppenderIfNeeded(Level.DEBUG, null);
 
             quiet = quiet0;
         }
@@ -450,8 +450,6 @@ public class GridTestLog4jLogger implements IgniteLogger, LoggerNodeIdAware
{
 
     /** {@inheritDoc} */
     @Override public void debug(String msg) {
-        if (!impl.isDebugEnabled())
-            warning("Logging at DEBUG level without checking if DEBUG level is enabled: "
+ msg);
 
         impl.debug(msg);
     }
@@ -491,7 +489,7 @@ public class GridTestLog4jLogger implements IgniteLogger, LoggerNodeIdAware
{
 
     /** {@inheritDoc} */
     @Override public boolean isDebugEnabled() {
-        return impl.isDebugEnabled();
+        return true;
     }
 
     /** {@inheritDoc} */


Mime
View raw message