ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/6] ignite git commit: ignite-4154
Date Wed, 02 Nov 2016 11:01:24 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4154-2 [created] d5d58f0af


ignite-4154


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

Branch: refs/heads/ignite-4154-2
Commit: a8ed7a740ebf86731831d0125db49f54cedd11d5
Parents: 76126bb
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Nov 1 16:59:44 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Nov 1 16:59:44 2016 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 72 ++++++++++----------
 1 file changed, 35 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a8ed7a74/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 0277061..d03ba5b 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
@@ -2140,8 +2140,6 @@ class ServerImpl extends TcpDiscoveryImpl {
 
             this.discardId = discardId;
             this.customDiscardId = customDiscardId;
-
-            cleanup();
         }
 
         /**
@@ -2163,41 +2161,41 @@ class ServerImpl extends TcpDiscoveryImpl {
          *
          */
         void cleanup() {
-//            Iterator<TcpDiscoveryAbstractMessage> msgIt = msgs.iterator();
-//
-//            boolean skipMsg = discardId != null;
-//            boolean skipCustomMsg = customDiscardId != null;
-//
-//            while (msgIt.hasNext()) {
-//                TcpDiscoveryAbstractMessage msg0 = msgIt.next();
-//
-//                if (msg0 instanceof TcpDiscoveryCustomEventMessage) {
-//                    if (skipCustomMsg) {
-//                        assert customDiscardId != null;
-//
-//                        if (F.eq(customDiscardId, msg0.id()))
-//                            skipCustomMsg = false;
-//                        else
-//                            msgIt.remove();
-//
-//                        continue;
-//                    }
-//                }
-//                else {
-//                    if (skipMsg) {
-//                        assert discardId != null;
-//
-//                        if (F.eq(discardId, msg0.id()))
-//                            skipMsg = false;
-//                        else
-//                            msgIt.remove();
-//
-//                        continue;
-//                    }
-//                }
-//
-//                break;
-//            }
+            Iterator<TcpDiscoveryAbstractMessage> msgIt = msgs.iterator();
+
+            boolean skipMsg = discardId != null;
+            boolean skipCustomMsg = customDiscardId != null;
+
+            while (msgIt.hasNext()) {
+                TcpDiscoveryAbstractMessage msg0 = msgIt.next();
+
+                if (msg0 instanceof TcpDiscoveryCustomEventMessage) {
+                    if (skipCustomMsg) {
+                        assert customDiscardId != null;
+
+                        if (F.eq(customDiscardId, msg0.id()))
+                            skipCustomMsg = false;
+                        else
+                            msgIt.remove();
+
+                        continue;
+                    }
+                }
+                else {
+                    if (skipMsg) {
+                        assert discardId != null;
+
+                        if (F.eq(discardId, msg0.id()))
+                            skipMsg = false;
+                        else
+                            msgIt.remove();
+
+                        continue;
+                    }
+                }
+
+                break;
+            }
         }
 
         /**


Mime
View raw message