ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [1/2] ignite git commit: IGNITE-1171 - Reverted initial fix.
Date Fri, 18 Sep 2015 00:22:39 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1171 8493576c1 -> 1d028ebde


IGNITE-1171 - Reverted initial fix.


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

Branch: refs/heads/ignite-1171
Commit: 359099a3fe00b259d09e9a344a2bfbb64b2c86d1
Parents: 8493576
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Sep 17 15:02:50 2015 -0700
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Sep 17 15:02:50 2015 -0700

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 29 +++-----------------
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |  3 --
 .../TcpDiscoveryNodeAddFinishedMessage.java     | 24 ----------------
 3 files changed, 4 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/359099a3/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 24b30c9..60921e3 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
@@ -3186,9 +3186,7 @@ class ServerImpl extends TcpDiscoveryImpl {
                     if (data != null)
                         spi.onExchange(node.id(), node.id(), data, U.gridClassLoader());
 
-                    // Collect discovery data the old way for older version nodes.
-                    if (TcpDiscoverySpi.DISCOVERY_DATA_COLLECT_ON_FINISH.compareTo(node.version())
> 0)
-                        msg.addDiscoveryData(locNodeId, spi.collectExchangeData(node.id()));
+                    msg.addDiscoveryData(locNodeId, spi.collectExchangeData(node.id()));
                 }
 
                 if (log.isDebugEnabled())
@@ -3255,12 +3253,9 @@ class ServerImpl extends TcpDiscoveryImpl {
                 }
 
                 // Notify outside of synchronized block.
-                // Notify on node added message only if joining node is an old node.
-                if (TcpDiscoverySpi.DISCOVERY_DATA_COLLECT_ON_FINISH.compareTo(node.version())
> 0) {
-                    if (dataMap != null) {
-                        for (Map.Entry<UUID, Map<Integer, byte[]>> entry : dataMap.entrySet())
-                            spi.onExchange(node.id(), entry.getKey(), entry.getValue(), U.gridClassLoader());
-                    }
+                if (dataMap != null) {
+                    for (Map.Entry<UUID, Map<Integer, byte[]>> entry : dataMap.entrySet())
+                        spi.onExchange(node.id(), entry.getKey(), entry.getValue(), U.gridClassLoader());
                 }
             }
 
@@ -3337,12 +3332,6 @@ class ServerImpl extends TcpDiscoveryImpl {
             }
 
             if (msg.verified() && !locNodeId.equals(nodeId) && spiStateCopy()
== CONNECTED && fireEvt) {
-                if (TcpDiscoverySpi.DISCOVERY_DATA_COLLECT_ON_FINISH.compareTo(node.version())
<= 0) {
-                    Map<Integer, byte[]> data = spi.collectExchangeData(node.id());
-
-                    msg.addDiscoveryData(locNodeId, data);
-                }
-
                 spi.stats.onNodeJoined();
 
                 // Make sure that node with greater order will never get EVT_NODE_JOINED
@@ -3396,16 +3385,6 @@ class ServerImpl extends TcpDiscoveryImpl {
                     mux.notifyAll();
                 }
 
-                // Notify outside of synchronized block.
-                if (TcpDiscoverySpi.DISCOVERY_DATA_COLLECT_ON_FINISH.compareTo(node.version())
<= 0) {
-                    Map<UUID, Map<Integer, byte[]>> dataMap = msg.oldNodesDiscoveryData();
-
-                    if (dataMap != null) {
-                        for (Map.Entry<UUID, Map<Integer, byte[]>> entry : dataMap.entrySet())
-                            spi.onExchange(node.id(), entry.getKey(), entry.getValue(), U.gridClassLoader());
-                    }
-                }
-
                 // Discovery manager must create local joined event before spiStart completes.
                 notifyDiscovery(EVT_NODE_JOINED, topVer, locNode);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/359099a3/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 237e6d9..6254605 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
@@ -222,9 +222,6 @@ public class TcpDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi,
T
     /** Failure detection timeout feature minor version. */
     final static byte FAILURE_DETECTION_MINOR_VER = 4;
 
-    /** */
-    public static final IgniteProductVersion DISCOVERY_DATA_COLLECT_ON_FINISH = IgniteProductVersion.fromString("1.4.0");
-
     /** Failure detection timeout feature maintainance version. */
     final static byte FAILURE_DETECTION_MAINT_VER = 1;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/359099a3/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 fc2a166..1b99a56 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
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.spi.discovery.tcp.messages;
 
-import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.UUID;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -47,9 +46,6 @@ public class TcpDiscoveryNodeAddFinishedMessage extends TcpDiscoveryAbstractMess
     @GridToStringExclude
     private Map<String, Object> clientNodeAttrs;
 
-    /** Discovery data from old nodes. */
-    private Map<UUID, Map<Integer, byte[]>> oldNodesDiscoData;
-
     /**
      * Constructor.
      *
@@ -60,8 +56,6 @@ public class TcpDiscoveryNodeAddFinishedMessage extends TcpDiscoveryAbstractMess
         super(creatorNodeId);
 
         this.nodeId = nodeId;
-
-        oldNodesDiscoData = new LinkedHashMap<>();
     }
 
     /**
@@ -81,24 +75,6 @@ public class TcpDiscoveryNodeAddFinishedMessage extends TcpDiscoveryAbstractMess
     }
 
     /**
-     * @return Discovery data from old nodes.
-     */
-    public Map<UUID, Map<Integer, byte[]>> oldNodesDiscoveryData() {
-        return oldNodesDiscoData;
-    }
-
-    /**
-     * @param nodeId Node ID.
-     * @param discoData Discovery data to add.
-     */
-    public void addDiscoveryData(UUID nodeId, Map<Integer, byte[]> discoData) {
-        // Old nodes disco data may be null if message
-        // makes more than 1 pass due to stopping of the nodes in topology.
-        if (oldNodesDiscoData != null)
-            oldNodesDiscoData.put(nodeId, discoData);
-    }
-
-    /**
      * @param clientDiscoData Discovery data for joined client.
      */
     public void clientDiscoData(@Nullable Map<UUID, Map<Integer, byte[]>> clientDiscoData)
{


Mime
View raw message