ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-5578
Date Wed, 02 Aug 2017 12:12:18 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5578 b4b3c78f4 -> ae9144cd2


ignite-5578


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

Branch: refs/heads/ignite-5578
Commit: ae9144cd2863c3b42a1aa283059089ecfdc38872
Parents: b4b3c78
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Aug 2 13:07:29 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Aug 2 15:12:11 2017 +0300

----------------------------------------------------------------------
 .../cache/CacheAffinitySharedManager.java       |  4 +--
 .../processors/cache/ExchangeContext.java       |  4 +--
 .../cache/ExchangeDiscoveryEvents.java          | 11 ++++--
 .../GridCachePartitionExchangeManager.java      |  4 +--
 .../dht/ClientCacheDhtTopologyFuture.java       |  5 +++
 .../dht/GridDhtPartitionTopologyImpl.java       | 10 +++---
 .../distributed/dht/GridDhtTopologyFuture.java  |  5 +++
 .../dht/atomic/GridDhtAtomicCache.java          |  2 +-
 .../GridDhtPartitionsAbstractMessage.java       | 11 +++++-
 .../GridDhtPartitionsExchangeFuture.java        | 38 ++++++++++++--------
 .../preloader/GridDhtPartitionsFullMessage.java |  3 --
 .../CacheLateAffinityAssignmentTest.java        | 18 +++++-----
 ...teCacheClientNodePartitionsExchangeTest.java |  6 ++--
 13 files changed, 75 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
index 5214f34..ea3196c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
@@ -1347,7 +1347,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
         final ExchangeDiscoveryEvents evts = fut.context().events();
 
         assert fut.context().mergeExchanges();
-        assert evts.serverJoin() && !evts.serverLeft();
+        assert evts.hasServerJoin() && !evts.hasServerLeft();
 
         WaitRebalanceInfo waitRebalanceInfo = initAffinityOnNodeJoin(fut, crd);
 
@@ -1374,7 +1374,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
         final ExchangeDiscoveryEvents evts = fut.context().events();
 
         assert fut.context().mergeExchanges();
-        assert evts.serverLeft();
+        assert evts.hasServerLeft();
 
         forAllRegisteredCacheGroups(new IgniteInClosureX<CacheGroupDescriptor>() {
             @Override public void applyx(CacheGroupDescriptor desc) throws IgniteCheckedException
{

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeContext.java
index bdab2e6..cc764f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeContext.java
@@ -33,7 +33,7 @@ import static org.apache.ignite.internal.processors.cache.GridCachePartitionExch
  */
 public class ExchangeContext {
     /** */
-    public static final String IGNITE_EXCHANGE_COMPATIBILITY_MODE = "IGNITE_EXCHANGE_COMPATIBILITY_MODE";
+    public static final String IGNITE_EXCHANGE_COMPATIBILITY_VER_1 = "IGNITE_EXCHANGE_COMPATIBILITY_VER_1";
 
     /** */
     private Set<Integer> requestGrpsAffOnJoin;
@@ -48,7 +48,7 @@ public class ExchangeContext {
     private final ExchangeDiscoveryEvents evts;
 
     /** */
-    private final boolean compatibilityNode = IgniteSystemProperties.getBoolean(IGNITE_EXCHANGE_COMPATIBILITY_MODE,
false);
+    private final boolean compatibilityNode = IgniteSystemProperties.getBoolean(IGNITE_EXCHANGE_COMPATIBILITY_VER_1,
false);
 
     /**
      * @param fut Exchange future.

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
index 5eab2a2..5be869f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
@@ -81,7 +81,7 @@ public class ExchangeDiscoveryEvents {
                 fut.sharedContext().mvcc().removeExplicitNodeLocks(evt.eventNode().id(),
fut.initialVersion());
         }
 
-        if (serverLeft())
+        if (hasServerLeft())
             warnNoAffinityNodes(fut.sharedContext());
     }
 
@@ -128,6 +128,11 @@ public class ExchangeDiscoveryEvents {
         return evts;
     }
 
+    public boolean serverLeftEvent(DiscoveryEvent evt) {
+        return  ((evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT) &&
!CU.clientNode(evt.eventNode()));
+    }
+
+
     public DiscoCache discoveryCache() {
         return discoCache;
     }
@@ -140,11 +145,11 @@ public class ExchangeDiscoveryEvents {
         return topVer;
     }
 
-    public boolean serverJoin() {
+    public boolean hasServerJoin() {
         return srvJoin;
     }
 
-    public boolean serverLeft() {
+    public boolean hasServerLeft() {
         return srvLeft;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index a8218e0..19cb14c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -131,8 +131,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
     private static final int EXCHANGE_HISTORY_SIZE =
         IgniteSystemProperties.getInteger(IgniteSystemProperties.IGNITE_EXCHANGE_HISTORY_SIZE,
1_000);
 
-    /** TODO IGNITE-5578. */
-    private static final IgniteProductVersion EXCHANGE_PROTOCOL_2_SINCE = IgniteProductVersion.fromString("2.1.0");
+    /** */
+    private static final IgniteProductVersion EXCHANGE_PROTOCOL_2_SINCE = IgniteProductVersion.fromString("2.2.0");
 
     /** Atomic reference for pending partition resend timeout object. */
     private AtomicReference<ResendTimeoutObject> pendingResend = new AtomicReference<>();

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/ClientCacheDhtTopologyFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/ClientCacheDhtTopologyFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/ClientCacheDhtTopologyFuture.java
index 96fa04a..317037b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/ClientCacheDhtTopologyFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/ClientCacheDhtTopologyFuture.java
@@ -72,6 +72,11 @@ public class ClientCacheDhtTopologyFuture extends GridDhtTopologyFutureAdapter
     }
 
     /** {@inheritDoc} */
+    @Override public boolean exchangeDone() {
+        throw new UnsupportedOperationException();
+    }
+
+    /** {@inheritDoc} */
     @Override public AffinityTopologyVersion topologyVersion() {
         return topVer;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index 9851be8..48192c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -61,8 +61,6 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST;
-import static org.apache.ignite.events.EventType.EVT_NODE_FAILED;
-import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
 import static org.apache.ignite.internal.events.DiscoveryCustomEvent.EVT_DISCOVERY_CUSTOM_EVT;
 import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.EVICTED;
 import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.LOST;
@@ -463,9 +461,11 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology
{
                         lastTopChangeVer = readyTopVer = evts.topologyVersion();
                     }
 
-                    for (DiscoveryEvent evt : evts.events()) {
-                        if ((evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT)
&& !CU.clientNode(evt.eventNode()))
-                            removeNode(evt.eventNode().id());
+                    if (evts.hasServerLeft()) {
+                        for (DiscoveryEvent evt : evts.events()) {
+                            if (evts.serverLeftEvent(evt))
+                                removeNode(evt.eventNode().id());
+                        }
                     }
 
                     ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
index 965590f..59ce1dd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java
@@ -40,8 +40,13 @@ public interface GridDhtTopologyFuture extends IgniteInternalFuture<AffinityTopo
      */
     public AffinityTopologyVersion topologyVersion();
 
+    /**
+     * @return Version when exchange started.
+     */
     public AffinityTopologyVersion initialVersion();
 
+    public boolean exchangeDone();
+
     /**
      * Returns error is cache topology is not valid.
      *

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 7c3d1c3..defe3ed 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1787,7 +1787,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                     if (!req.topologyLocked()) {
                         // Can not wait for topology future since it will break
                         // GridNearAtomicCheckUpdateRequest processing.
-                        remap = !top.topologyVersionFuture().isDone() ||
+                        remap = !top.topologyVersionFuture().exchangeDone() ||
                             needRemap(req.topologyVersion(), top.readyTopologyVersion());
                     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
index 77a5d9b..95c1a4f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
@@ -103,6 +103,9 @@ public abstract class GridDhtPartitionsAbstractMessage extends GridCacheMessage
         return exchId;
     }
 
+    /**
+     * @param exchId Exchange ID.
+     */
     public void exchangeId(GridDhtPartitionExchangeId exchId) {
         this.exchId = exchId;
     }
@@ -134,10 +137,16 @@ public abstract class GridDhtPartitionsAbstractMessage extends GridCacheMessage
         flags = compressed ? (byte)(flags | COMPRESSED_FLAG_MASK) : (byte)(flags & ~COMPRESSED_FLAG_MASK);
     }
 
-    public void restoreState(boolean restoreState) {
+    /**
+     * @param restoreState Restore exchange state flag.
+     */
+    void restoreState(boolean restoreState) {
         flags = restoreState ? (byte)(flags | RESTORE_STATE_FLAG_MASK) : (byte)(flags &
~RESTORE_STATE_FLAG_MASK);
     }
 
+    /**
+     * @return Restore exchange state flag.
+     */
     public boolean restoreState() {
         return (flags & RESTORE_STATE_FLAG_MASK) != 0;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 2e0f742..8241fdf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -64,6 +64,7 @@ import org.apache.ignite.internal.processors.cache.DynamicCacheChangeBatch;
 import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
 import org.apache.ignite.internal.processors.cache.ExchangeActions;
 import org.apache.ignite.internal.processors.cache.ExchangeContext;
+import org.apache.ignite.internal.processors.cache.ExchangeDiscoveryEvents;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
@@ -344,7 +345,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
     /** {@inheritDoc} */
     @Override public AffinityTopologyVersion topologyVersion() {
-        assert isDone();
+        assert exchangeDone();
 
         return exchCtx.events().topologyVersion();
     }
@@ -536,13 +537,14 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
             else
                 state = cctx.kernalContext().clientNode() ? ExchangeLocalState.CLIENT : ExchangeLocalState.SRV;
 
-            if (exchLog.isInfoEnabled())
+            if (exchLog.isInfoEnabled()) {
                 exchLog.info("Started exchange init [topVer=" + topVer +
                     ", crd=" + crdNode +
                     ", evt=" + IgniteUtils.gridEventName(discoEvt.type()) +
                     ", evtNode=" + discoEvt.eventNode().id() +
-                    ", customEvt=" + (discoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT ? ((DiscoveryCustomEvent)discoEvt).customMessage()
: null) +
-                    ']');
+                    ", customEvt=" + (discoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT ? ((DiscoveryCustomEvent)
discoEvt).customMessage() : null) +
+                    ", allowMerge=" + exchCtx.mergeExchanges() + ']');
+            }
 
             ExchangeType exchange;
 
@@ -1339,11 +1341,11 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
     public boolean serverNodeDiscoveryEvent() {
         assert exchCtx != null;
 
-        return exchCtx.events().serverJoin() || exchCtx.events().serverLeft();
+        return exchCtx.events().hasServerJoin() || exchCtx.events().hasServerLeft();
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isDone() {
+    @Override public boolean exchangeDone() {
         return done.get();
     }
 
@@ -1452,9 +1454,15 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
             initFut.onDone(err == null);
 
-            if (exchId.isLeft()) {
-                for (CacheGroupContext grp : cctx.cache().cacheGroups())
-                    grp.affinityFunction().removeNode(exchId.nodeId());
+            ExchangeDiscoveryEvents evts = exchCtx.events();
+
+            if (evts.hasServerLeft()) {
+                for (DiscoveryEvent evt : exchCtx.events().events()) {
+                    if (evts.serverLeftEvent(evt)) {
+                        for (CacheGroupContext grp : cctx.cache().cacheGroups())
+                            grp.affinityFunction().removeNode(evt.eventNode().id());
+                    }
+                }
             }
 
             exchActions = null;
@@ -2156,11 +2164,11 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
                     }
                 }
 
-                assert exchCtx.events().serverJoin() || exchCtx.events().serverLeft();
+                assert exchCtx.events().hasServerJoin() || exchCtx.events().hasServerLeft();
 
                 exchCtx.events().processEvents(this);
 
-                if (exchCtx.events().serverLeft())
+                if (exchCtx.events().hasServerLeft())
                     idealAffDiff = cctx.affinity().onServerLeftWithExchangeMergeProtocol(this);
                 else
                     cctx.affinity().onServerJoinWithExchangeMergeProtocol(this, true);
@@ -2224,10 +2232,10 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
                 }
             }
             else {
-                if (exchCtx.events().serverJoin())
+                if (exchCtx.events().hasServerJoin())
                     assignPartitionsStates();
 
-                if (exchCtx.events().serverLeft())
+                if (exchCtx.events().hasServerLeft())
                     detectLostPartitions(resTopVer);
             }
 
@@ -2242,7 +2250,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
                 msg.resultTopologyVersion(resTopVer);
 
-                if (exchCtx.events().serverLeft())
+                if (exchCtx.events().hasServerLeft())
                     msg.idealAffinityDiff(idealAffDiff);
             }
 
@@ -2643,7 +2651,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
                 if (localJoinExchange())
                     cctx.affinity().onLocalJoin(this, msg, resTopVer);
                 else {
-                    if (exchCtx.events().serverLeft())
+                    if (exchCtx.events().hasServerLeft())
                         cctx.affinity().mergeExchangesOnServerLeft(this, msg);
                     else
                         cctx.affinity().onServerJoinWithExchangeMergeProtocol(this, false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
index d27e302..393cf0e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsFullMessage.java
@@ -19,14 +19,12 @@ package org.apache.ignite.internal.processors.cache.distributed.dht.preloader;
 
 import java.io.Externalizable;
 import java.nio.ByteBuffer;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
 import org.apache.ignite.internal.GridDirectMap;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
@@ -34,7 +32,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
index 16cb625..0d106a4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
@@ -102,7 +102,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-import static org.apache.ignite.internal.processors.cache.ExchangeContext.IGNITE_EXCHANGE_COMPATIBILITY_MODE;
+import static org.apache.ignite.internal.processors.cache.ExchangeContext.IGNITE_EXCHANGE_COMPATIBILITY_VER_1;
 
 /**
  *
@@ -384,7 +384,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testAffinitySimpleNoCacheOnCoordinator2() throws Exception {
-        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE, "true");
+        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true");
 
         try {
             cacheC = new IgniteClosure<String, CacheConfiguration[]>() {
@@ -435,7 +435,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
             checkAffinity(3, topVer(7, 1), true);
         }
         finally {
-            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE);
+            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1);
         }
     }
 
@@ -655,7 +655,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testNodeLeaveExchangeWaitAffinityMessage() throws Exception {
-        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE, "true");
+        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true");
 
         try {
             Ignite ignite0 = startServer(0, 1);
@@ -692,7 +692,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
             checkOrderCounters(3, topVer(5, 0));
         }
         finally {
-            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE);
+            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1);
         }
     }
 
@@ -1298,7 +1298,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     private void nodeLeftExchangeCoordinatorLeave(int nodes) throws Exception {
-        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE, "true");
+        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true");
 
         try {
             assert nodes > 2 : nodes;
@@ -1336,7 +1336,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
             awaitPartitionMapExchange();
         }
         finally {
-            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE);
+            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1);
         }
     }
 
@@ -1445,7 +1445,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testDelayAssignmentAffinityChanged2() throws Exception {
-        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE, "true");
+        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true");
 
         try {
             Ignite ignite0 = startServer(0, 1);
@@ -1514,7 +1514,7 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest
{
             }
         }
         finally {
-            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE);
+            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ae9144cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
index 8090c66..7c13e35 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
@@ -58,7 +58,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
-import static org.apache.ignite.internal.processors.cache.ExchangeContext.IGNITE_EXCHANGE_COMPATIBILITY_MODE;
+import static org.apache.ignite.internal.processors.cache.ExchangeContext.IGNITE_EXCHANGE_COMPATIBILITY_VER_1;
 
 /**
  *
@@ -206,13 +206,13 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
      * @throws Exception If failed.
      */
     public void testPartitionsExchangeCompatibilityMode() throws Exception {
-        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE, "true");
+        System.setProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1, "true");
 
         try {
             partitionsExchange(true);
         }
         finally {
-            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_MODE);
+            System.clearProperty(IGNITE_EXCHANGE_COMPATIBILITY_VER_1);
         }
     }
 


Mime
View raw message