You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/08/02 10:38:34 UTC
[16/17] ignite git commit: ignite-5578
ignite-5578
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6e61835e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6e61835e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6e61835e
Branch: refs/heads/ignite-5578-debug
Commit: 6e61835e01b08fc56643558908a18075e1ab00a6
Parents: b4b3c78
Author: sboikov <sb...@gridgain.com>
Authored: Wed Aug 2 13:07:29 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Aug 2 13:30:36 2017 +0300
----------------------------------------------------------------------
.../processors/cache/ExchangeContext.java | 4 ++--
.../cache/GridCachePartitionExchangeManager.java | 4 ++--
.../GridDhtPartitionsAbstractMessage.java | 11 ++++++++++-
.../GridDhtPartitionsExchangeFuture.java | 7 ++++---
.../preloader/GridDhtPartitionsFullMessage.java | 3 ---
.../CacheLateAffinityAssignmentTest.java | 18 +++++++++---------
...niteCacheClientNodePartitionsExchangeTest.java | 6 +++---
7 files changed, 30 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e61835e/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/6e61835e/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/6e61835e/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/6e61835e/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..8099355 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
@@ -536,13 +536,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;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6e61835e/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/6e61835e/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/6e61835e/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);
}
}