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 2018/07/27 15:01:43 UTC
[1/7] ignite git commit: ignite-6467
Repository: ignite
Updated Branches:
refs/heads/ignite-6467 [created] ff084537a
ignite-6467
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6899948c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6899948c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6899948c
Branch: refs/heads/ignite-6467
Commit: 6899948c806e5d3c9666bab1e800581ddefd8f6c
Parents: 8adf255
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jul 24 03:25:06 2018 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jul 24 03:25:06 2018 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/TestDebugLog1.java | 488 +++++++++++++++++++
.../affinity/GridAffinityAssignmentCache.java | 10 +
.../processors/cache/GridCacheMapEntry.java | 3 +
.../distributed/dht/GridDhtLocalPartition.java | 12 +-
.../dht/GridPartitionedSingleGetFuture.java | 5 +
.../GridDhtPartitionsExchangeFuture.java | 8 +
.../distributed/CacheExchangeMergeTest.java | 27 +-
7 files changed, 547 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/6899948c/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java b/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
new file mode 100644
index 0000000..acb1372
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
@@ -0,0 +1,488 @@
+package org.apache.ignite;/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.ignite.internal.processors.cache.CacheObject;
+import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
+import org.apache.ignite.internal.processors.cache.KeyCacheObject;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * TODO
+ if (!cacheMsg.partitionExchangeMessage() && !(cacheMsg instanceof GridDhtPartitionDemandMessage) && !(cacheMsg instanceof GridDhtPartitionSupplyMessage))
+ TestDebugLog.addMessage("Message: " + cacheMsg);
+ */
+public class TestDebugLog1 {
+ public static volatile boolean DEBUG;
+
+ public static void debugLog(IgniteLogger log, String msg) {
+ if (DEBUG)
+ log.info(msg);
+ }
+
+ /** */
+ private static final List<Object> msgs = Collections.synchronizedList(new ArrayList<>(500_000));
+
+ /** */
+ private static final SimpleDateFormat DEBUG_DATE_FMT = new SimpleDateFormat("HH:mm:ss,SSS");
+
+ static class Message {
+ String thread = Thread.currentThread().getName();
+
+ String msg;
+
+ long ts = U.currentTimeMillis();
+
+ public Message(String msg) {
+ this.msg = msg;
+ }
+
+ public String toString() {
+ return "Msg [thread=" + thread + ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) + ", msg=" + msg + ']';
+ }
+ }
+
+ static class PageMessage extends Message {
+ long pageId;
+
+ int bucket;
+
+ public PageMessage(String msg, long pageId, int bucket) {
+ super(msg);
+ this.bucket = bucket;
+ this.pageId = pageId;
+ }
+
+ public String toString() {
+ return "EntryMsg [pageId=" + pageId + ", bucket=" + bucket + ", msg=" + msg + ", thread=" + thread + ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) + ']';
+ }
+ }
+
+ static class BucketMessage extends Message {
+ int bucket;
+
+ public BucketMessage(String msg, int bucket) {
+ super(msg);
+ this.bucket = bucket;
+ }
+
+ public String toString() {
+ return "BucketMsg [bucket=" + bucket + ", msg=" + msg + ", thread=" + thread + ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) + ']';
+ }
+ }
+
+ static class EntryMessage extends Message {
+ Object key;
+ Object val;
+ int cacheId;
+
+ public EntryMessage(int cacheId, Object key, Object val, String msg) {
+ super(msg);
+
+ this.cacheId = cacheId;
+ this.key = key;
+ this.val = val;
+ }
+
+ public String toString() {
+ return "EntryMsg [key=" + key + ", msg=" + msg + ", thread=" + thread + ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) +
+ ", val=" + val +']';
+ }
+ }
+ static class PartMessage extends Message {
+ private final int cacheId;
+ private final int partId;
+ private Object val;
+
+ public PartMessage(int cacheId, int partId, Object val, String msg) {
+ super(msg);
+
+ this.cacheId = cacheId;
+ this.partId = partId;
+ this.val = val;
+ this.msg = msg;
+ }
+
+ boolean match(int cacheId, int partId) {
+ return this.cacheId == cacheId && this.partId == partId;
+ }
+
+ @Override public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ PartMessage partKey = (PartMessage) o;
+
+ if (cacheId != partKey.cacheId) return false;
+ return partId == partKey.partId;
+
+ }
+
+ @Override public int hashCode() {
+ int result = cacheId;
+ result = 31 * result + partId;
+ return result;
+ }
+
+ public String toString() {
+ return "PartMessage [partId=" + partId +
+ ", val=" + val +
+ ", msg=" + msg +
+ ", thread=" + thread +
+ ", time=" + DEBUG_DATE_FMT.format(new Date(ts)) +
+ ", cacheId=" + cacheId + ']';
+ }
+ }
+
+ static final boolean out = false;
+
+ public static void addPageMessage(long pageId, String msg) {
+ //msgs.add(new PageMessage(msg, pageId, -1));
+ }
+
+ public static void addBucketMessage(int bucket, String msg) {
+ //msgs.add(new BucketMessage(msg, bucket));
+ }
+
+ public static void addPageMessage(long pageId, int bucket, String msg) {
+ //msgs.add(new PageMessage(msg, pageId, bucket));
+ }
+
+ static final boolean disabled = false;
+
+ public static void addMessage(String msg) {
+ if (disabled)
+ return;
+
+ msgs.add(new Message(msg));
+
+ if (out)
+ System.out.println(msg);
+ }
+
+ public static void addCacheEntryMessage(GridCacheMapEntry e, CacheObject val, String msg) {
+ addEntryMessage(e.context().cacheId(), e.key().value(e.context().cacheObjectContext(), false),
+ val != null ? val.value(e.context().cacheObjectContext(), false) : null, msg);
+ }
+
+ public static void addCacheEntryMessage(GridCacheMapEntry e, Object val, String msg) {
+ addEntryMessage(e.context().cacheId(), e.key().value(e.context().cacheObjectContext(), false), val, msg);
+ }
+
+ public static void addEntryMessage(int cacheId, Object key, Object val, String msg) {
+ if (cacheId != testCache)
+ return;
+ // if (!(val instanceof TcpDiscoveryHeartbeatMessage || val instanceof TcpDiscoveryCustomEventMessage || val instanceof TcpDiscoveryCustomEventMessage))
+// return;
+
+// if (val instanceof TcpDiscoveryHeartbeatMessage || val instanceof TcpDiscoveryCustomEventMessage || val instanceof TcpDiscoveryCustomEventMessage)
+// return;
+//
+ if (disabled)
+ return;
+
+ if (key instanceof KeyCacheObject)
+ key = ((KeyCacheObject) key).value(null, false);
+
+ assert key != null;
+
+// if (val instanceof CacheObject)
+// val = ((CacheObject) val).value(null, false);
+
+ EntryMessage msg0 = new EntryMessage(cacheId, key, val, msg);
+
+ msgs.add(msg0);
+
+ if (out)
+ System.out.println(msg0.toString());
+ }
+
+ public static void printMessages(String fileName) {
+ List<Object> msgs0;
+
+ synchronized (msgs) {
+ msgs0 = new ArrayList<>(msgs);
+
+ // msgs.clear();
+ }
+
+ if (fileName != null) {
+ try {
+ FileOutputStream out = new FileOutputStream(fileName);
+
+ PrintWriter w = new PrintWriter(out);
+
+ for (Object msg : msgs0)
+ w.println(msg.toString());
+
+ w.close();
+
+ out.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ else {
+ for (Object msg : msgs0)
+ System.out.println(msg);
+ }
+ }
+
+ private static final int testCache = CU.cacheId("c8");
+
+ public static void addPartMessage(int cacheId,
+ int partId,
+ Object val,
+ String msg) {
+ if (cacheId != testCache)
+ return;
+
+ msgs.add(new PartMessage(cacheId, partId, val, msg));
+ }
+
+ public static void printPartMessages(String fileName, int cacheId, int partId) {
+ List<Object> msgs0;
+
+ synchronized (msgs) {
+ msgs0 = new ArrayList<>(msgs);
+
+ //msgs.clear();
+ }
+
+ if (fileName != null) {
+ try {
+ FileOutputStream out = new FileOutputStream(fileName);
+
+ PrintWriter w = new PrintWriter(out);
+
+ for (Object msg : msgs0) {
+ if (msg instanceof PartMessage && !((PartMessage)msg).match(cacheId, partId))
+ continue;
+
+ w.println(msg.toString());
+ }
+
+ w.close();
+
+ out.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ else {
+ for (Object msg : msgs0) {
+ if (msg instanceof PartMessage && !((PartMessage)msg).match(cacheId, partId))
+ continue;
+
+ System.out.println(msg);
+ }
+ }
+ }
+
+ public static void printPageMessages(String fileName, long pageId) {
+ List<Object> msgs0;
+
+ synchronized (msgs) {
+ msgs0 = new ArrayList<>(msgs);
+
+ //msgs.clear();
+ }
+
+ if (fileName != null) {
+ try {
+ FileOutputStream out = new FileOutputStream(fileName);
+
+ PrintWriter w = new PrintWriter(out);
+
+ for (Object msg : msgs0) {
+ if (msg instanceof PageMessage && ((PageMessage)msg).pageId != pageId)
+ continue;
+
+ w.println(msg.toString());
+ }
+
+ w.close();
+
+ out.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ else {
+ for (Object msg : msgs0) {
+ if (msg instanceof PageMessage && ((PageMessage)msg).pageId != pageId)
+ continue;
+
+ System.out.println(msg);
+ }
+ }
+ }
+
+ public static void printBucketMessages(String fileName, int bucketId) {
+ List<Object> msgs0;
+
+ synchronized (msgs) {
+ msgs0 = new ArrayList<>(msgs);
+
+ //msgs.clear();
+ }
+
+ try {
+ FileOutputStream out = new FileOutputStream(fileName);
+
+ PrintWriter w = new PrintWriter(out);
+
+ for (Object msg : msgs0) {
+ if (msg instanceof BucketMessage && ((BucketMessage)msg).bucket != bucketId)
+ continue;
+
+ w.println(msg.toString());
+ }
+
+ w.close();
+
+ out.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void printKeyMessages(String fileName, Object key) {
+ printKeyMessages(fileName, Collections.singleton(key));
+ }
+
+ public static void printKeyMessages(String fileName, Set<Object> keys) {
+ assert !F.isEmpty(keys);
+
+ List<Object> msgs0;
+
+ synchronized (msgs) {
+ msgs0 = new ArrayList<>(msgs);
+
+ //msgs.clear();
+ }
+
+ if (fileName != null) {
+ try {
+ FileOutputStream out = new FileOutputStream(fileName);
+
+ PrintWriter w = new PrintWriter(out);
+
+ for (Object msg : msgs0) {
+ if (msg instanceof EntryMessage && !(keys.contains(((EntryMessage)msg).key)))
+ continue;
+
+ w.println(msg.toString());
+ }
+
+ w.close();
+
+ out.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ else {
+ for (Object msg : msgs0) {
+ if (msg instanceof EntryMessage && !(keys.contains(((EntryMessage)msg).key)))
+ continue;
+
+ EntryMessage msg0 = (EntryMessage)msg;
+
+ if (msg0.val instanceof Exception) {
+ System.out.print(msg0.thread + ", msg=" + msg0.msg + ", ");
+
+ ((Exception)msg0.val).printStackTrace(System.out);
+ }
+ else
+ System.out.println(msg);
+ }
+ }
+ }
+
+ public static void printKeyAndPartMessages(String fileName, Object key, int partId, int cacheId) {
+ assert key != null;
+
+ List<Object> msgs0;
+
+ synchronized (msgs) {
+ msgs0 = new ArrayList<>(msgs);
+
+ //msgs.clear();
+ }
+
+ if (fileName != null) {
+ try {
+ FileOutputStream out = new FileOutputStream(fileName);
+
+ PrintWriter w = new PrintWriter(out);
+
+ for (Object msg : msgs0) {
+ if (msg instanceof EntryMessage && !((EntryMessage)msg).key.equals(key))
+ continue;
+
+ if (msg instanceof PartMessage) {
+ PartMessage pm = (PartMessage)msg;
+
+ if (pm.cacheId != cacheId || pm.partId != partId)
+ continue;
+ }
+
+ w.println(msg.toString());
+ }
+
+ w.close();
+
+ out.close();
+ }
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ else {
+ for (Object msg : msgs0) {
+ if (msg instanceof EntryMessage && !((EntryMessage)msg).key.equals(key))
+ continue;
+
+ System.out.println(msg);
+ }
+ }
+ }
+
+ public static void clear() {
+ msgs.clear();
+ }
+
+ public static void main(String[] args) {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/6899948c/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index 34e2b0a..139ff85 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -35,6 +35,7 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.TestDebugLog1;
import org.apache.ignite.cache.affinity.AffinityCentralizedFunction;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.cluster.ClusterNode;
@@ -231,6 +232,13 @@ public class GridAffinityAssignmentCache {
+ ", topVer=" + topVer
+ ", aff=" + fold(affAssignment) + "]");
}
+
+ debugAssignment("init " + topVer, affAssignment);
+ }
+
+ private void debugAssignment(String msg, List<List<ClusterNode>> affAssignment) {
+ for (int i = 0; i < partsCnt; i++)
+ TestDebugLog1.addPartMessage(grpId, i, U.nodeIds(affAssignment.get(i)), msg);
}
/**
@@ -399,6 +407,8 @@ public class GridAffinityAssignmentCache {
if (locCache)
initialize(topVer, assignment);
+ debugAssignment("calc " + topVer, assignment);
+
return assignment;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6899948c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 03f6d11..4620bbc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -33,6 +33,7 @@ import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.TestDebugLog1;
import org.apache.ignite.cache.eviction.EvictableEntry;
import org.apache.ignite.internal.NodeStoppingException;
import org.apache.ignite.internal.pagemem.wal.StorageException;
@@ -198,6 +199,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
protected void value(@Nullable CacheObject val) {
assert lock.isHeldByCurrentThread();
+ TestDebugLog1.addCacheEntryMessage(this, val, "set");
+
this.val = val;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/6899948c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index e13c952..06648846 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -31,6 +31,7 @@ import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.TestDebugLog1;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException;
import org.apache.ignite.internal.IgniteInternalFuture;
@@ -541,8 +542,15 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
return update;
}
}
- else
- return this.state.compareAndSet(state, setPartState(state, toState));
+ else {
+ if (this.state.compareAndSet(state, setPartState(state, toState))) {
+ TestDebugLog1.addPartMessage(grp.groupId(), id, toState, "set state");
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/6899948c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index e0aea9a..0e163c5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -23,6 +23,7 @@ import java.util.UUID;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.TestDebugLog1;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.IgniteDiagnosticAware;
import org.apache.ignite.internal.IgniteDiagnosticPrepareContext;
@@ -328,6 +329,8 @@ public class GridPartitionedSingleGetFuture extends GridCacheFutureAdapter<Objec
List<ClusterNode> affNodes = cctx.affinity().nodesByPartition(part, topVer);
+ TestDebugLog1.addEntryMessage(cctx.cacheId(), key, U.nodeIds(affNodes), "get map " + topVer);
+
if (affNodes.isEmpty()) {
onDone(serverNotFoundError(topVer));
@@ -501,6 +504,8 @@ public class GridPartitionedSingleGetFuture extends GridCacheFutureAdapter<Objec
* @param res Result.
*/
public void onResult(UUID nodeId, GridNearSingleGetResponse res) {
+ TestDebugLog1.addEntryMessage(cctx.cacheId(), key, nodeId, "get res " + topVer);
+
if (!processResponse(nodeId) ||
!checkError(res.error(), res.invalidPartitions(), res.topologyVersion(), nodeId))
return;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6899948c/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 4d0b583..faedc0a 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
@@ -40,6 +40,7 @@ import java.util.concurrent.locks.ReadWriteLock;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.TestDebugLog1;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.CacheRebalanceMode;
import org.apache.ignite.cluster.ClusterNode;
@@ -660,6 +661,13 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
", evtNode=" + firstDiscoEvt.eventNode().id() +
", customEvt=" + (firstDiscoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT ? ((DiscoveryCustomEvent)firstDiscoEvt).customMessage() : null) +
", allowMerge=" + exchCtx.mergeExchanges() + ']');
+
+ TestDebugLog1.addMessage("Started exchange init [topVer=" + topVer +
+ ", crd=" + crdNode +
+ ", evt=" + IgniteUtils.gridEventName(firstDiscoEvt.type()) +
+ ", evtNode=" + firstDiscoEvt.eventNode().id() +
+ ", customEvt=" + (firstDiscoEvt.type() == EVT_DISCOVERY_CUSTOM_EVT ? ((DiscoveryCustomEvent)firstDiscoEvt).customMessage() : null) +
+ ", allowMerge=" + exchCtx.mergeExchanges() + ']');
}
ExchangeType exchange;
http://git-wip-us.apache.org/repos/asf/ignite/blob/6899948c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index 4b281b0..39b5fcb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -31,9 +31,11 @@ import java.util.concurrent.Future;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
+import junit.framework.AssertionFailedError;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteSystemProperties;
+import org.apache.ignite.TestDebugLog1;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cluster.ClusterNode;
@@ -62,6 +64,7 @@ import org.apache.ignite.internal.util.future.GridCompoundFuture;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.PA;
+import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.lang.IgniteBiPredicate;
import org.apache.ignite.lang.IgniteClosure;
import org.apache.ignite.lang.IgnitePredicate;
@@ -450,6 +453,8 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
checkCaches();
stopAllGrids();
+
+ TestDebugLog1.clear();
}
}
@@ -1374,8 +1379,15 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
Map<Object, Object> res = cache.getAll(map.keySet());
- for (Map.Entry<Integer, Integer> e : map.entrySet())
- assertEquals(err, e.getValue(), res.get(e.getKey()));
+ for (Map.Entry<Integer, Integer> e : map.entrySet()) {
+ try {
+ assertEquals(err, e.getValue(), res.get(e.getKey()));
+ } catch (AssertionFailedError err0) {
+ TestDebugLog1.addMessage(err0.getMessage());
+ TestDebugLog1.printPartMessages("test_debug.txt", CU.cacheId(cacheName), node.affinity(cacheName).partition(e.getKey()));
+ System.exit(1);
+ }
+ }
}
if (cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL) {
@@ -1430,8 +1442,15 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
// No-op.
}
- for (Map.Entry<Object, Object> e : map.entrySet())
- assertEquals(err, e.getValue(), cache.get(e.getKey()));
+ for (Map.Entry<Object, Object> e : map.entrySet()) {
+ try {
+ assertEquals(err + " " + concurrency + " " + isolation, e.getValue(), cache.get(e.getKey()));
+ } catch (AssertionFailedError err0) {
+ TestDebugLog1.addMessage(err0.getMessage());
+ TestDebugLog1.printPartMessages("test_debug.txt", CU.cacheId(cache.getName()), node.affinity(cache.getName()).partition(e.getKey()));
+ System.exit(1);
+ }
+ }
}
/**
[4/7] ignite git commit: ignite-6467
Posted by sb...@apache.org.
ignite-6467
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b01f11bc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b01f11bc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b01f11bc
Branch: refs/heads/ignite-6467
Commit: b01f11bc3ea1e0f1bf9707c9bc7ce8cf28afb201
Parents: 625af1b
Author: sboikov <sb...@apache.org>
Authored: Tue Jul 24 10:28:00 2018 +0300
Committer: sboikov <sb...@apache.org>
Committed: Tue Jul 24 10:28:00 2018 +0300
----------------------------------------------------------------------
.../processors/cache/distributed/CacheExchangeMergeTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b01f11bc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index 8d07fa0..dbf95f4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -443,7 +443,7 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
if (cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL) {
for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
for (TransactionIsolation isolation : TransactionIsolation.values())
- checkNodeCaches(err, node, cache, TransactionConcurrency.OPTIMISTIC, TransactionIsolation.SERIALIZABLE);
+ checkNodeCaches(err, node, cache, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
}
}
}
@@ -492,7 +492,7 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
// No-op.
ignore.printStackTrace();
- System.exit(2);
+ return;
}
for (Map.Entry<Object, Object> e : map.entrySet()) {
[3/7] ignite git commit: ignite-6467
Posted by sb...@apache.org.
ignite-6467
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/625af1be
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/625af1be
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/625af1be
Branch: refs/heads/ignite-6467
Commit: 625af1be8fc995d7f7ab1a193cd8e08bdb1490ec
Parents: b79faa3
Author: sboikov <sb...@apache.org>
Authored: Tue Jul 24 10:16:13 2018 +0300
Committer: sboikov <sb...@apache.org>
Committed: Tue Jul 24 10:16:13 2018 +0300
----------------------------------------------------------------------
.../java/org/apache/ignite/TestDebugLog1.java | 7 +++++++
.../processors/cache/GridCacheMapEntry.java | 6 ++++--
.../distributed/dht/GridDhtCacheEntry.java | 5 +++++
.../dht/GridDhtPartitionTopologyImpl.java | 2 +-
.../distributed/CacheExchangeMergeTest.java | 22 +++++++++-----------
5 files changed, 27 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/625af1be/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java b/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
index acb1372..318028c 100644
--- a/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
+++ b/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
@@ -474,6 +474,13 @@ public class TestDebugLog1 {
if (msg instanceof EntryMessage && !((EntryMessage)msg).key.equals(key))
continue;
+ if (msg instanceof PartMessage) {
+ PartMessage pm = (PartMessage)msg;
+
+ if (pm.cacheId != cacheId || pm.partId != partId)
+ continue;
+ }
+
System.out.println(msg);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/625af1be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 4620bbc..721db55 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -199,8 +199,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
protected void value(@Nullable CacheObject val) {
assert lock.isHeldByCurrentThread();
- TestDebugLog1.addCacheEntryMessage(this, val, "set");
-
this.val = val;
}
@@ -1042,6 +1040,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
if (tx != null && cctx.group().persistenceEnabled() && cctx.group().walEnabled())
logPtr = logTxUpdate(tx, val, expireTime, updateCntr0);
+ TestDebugLog1.addCacheEntryMessage(this, val, "innerSet");
+
update(val, expireTime, ttl, newVer, true);
drReplicate(drType, val, newVer, topVer);
@@ -2773,6 +2773,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
update = storeValue(val, expTime, ver, p);
if (update) {
+ TestDebugLog1.addCacheEntryMessage(this, val, "initialVal");
+
update(val, expTime, ttl, ver, true);
boolean skipQryNtf = false;
http://git-wip-us.apache.org/repos/asf/ignite/blob/625af1be/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
index fe02090..2c43342 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheEntry.java
@@ -24,6 +24,7 @@ import java.util.Collections;
import java.util.List;
import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.TestDebugLog1;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
@@ -648,6 +649,10 @@ public class GridDhtCacheEntry extends GridDistributedCacheEntry {
']');
}
+
+ TestDebugLog1.addCacheEntryMessage(this, val, "clear");
+
+
removeValue();
// Give to GC.
http://git-wip-us.apache.org/repos/asf/ignite/blob/625af1be/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 aa43b2f..324048f 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
@@ -912,7 +912,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
else if (loc != null && state == RENTING && !showRenting) {
throw new GridDhtInvalidPartitionException(p, "Adding entry to partition that is concurrently " +
"evicted [grp=" + grp.cacheOrGroupName() + ", part=" + p + ", shouldBeMoving="
- + ", belongs=" + belongs + ", topVer=" + topVer + ", curTopVer=" + this.readyTopVer + "]");
+ + ", belongs=" + belongs + ", belongs0=" + partitionLocalNode(p, this.readyTopVer) + ", topVer=" + topVer + ", curTopVer=" + this.readyTopVer + "]");
}
if (loc == null) {
http://git-wip-us.apache.org/repos/asf/ignite/blob/625af1be/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index c81883d..8d07fa0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -206,13 +206,6 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
- public void testConcurrentStartServers() throws Exception {
- concurrentStart(false);
- }
-
- /**
- * @throws Exception If failed.
- */
public void testConcurrentStartServersAndClients() throws Exception {
concurrentStart(true);
}
@@ -439,8 +432,9 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
try {
assertEquals(err, e.getValue(), res.get(e.getKey()));
} catch (AssertionFailedError err0) {
- TestDebugLog1.addMessage(err0.getMessage());
- TestDebugLog1.printPartMessages("test_debug.txt", CU.cacheId(cacheName), node.affinity(cacheName).partition(e.getKey()));
+ err0.printStackTrace(System.out);
+ TestDebugLog1.addMessage("1 " + err0.getMessage());
+ TestDebugLog1.printKeyAndPartMessages("test_debug.txt", e.getKey(), node.affinity(cacheName).partition(e.getKey()), CU.cacheId(cacheName));
System.exit(1);
}
}
@@ -449,7 +443,7 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
if (cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL) {
for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
for (TransactionIsolation isolation : TransactionIsolation.values())
- checkNodeCaches(err, node, cache, concurrency, isolation);
+ checkNodeCaches(err, node, cache, TransactionConcurrency.OPTIMISTIC, TransactionIsolation.SERIALIZABLE);
}
}
}
@@ -496,14 +490,18 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
}
catch (ClusterTopologyException ignore) {
// No-op.
+ ignore.printStackTrace();
+
+ System.exit(2);
}
for (Map.Entry<Object, Object> e : map.entrySet()) {
try {
assertEquals(err + " " + concurrency + " " + isolation, e.getValue(), cache.get(e.getKey()));
} catch (AssertionFailedError err0) {
- TestDebugLog1.addMessage(err0.getMessage());
- TestDebugLog1.printPartMessages("test_debug.txt", CU.cacheId(cache.getName()), node.affinity(cache.getName()).partition(e.getKey()));
+ err0.printStackTrace(System.out);
+ TestDebugLog1.addMessage("2 " + node.cluster().localNode().id() + " " + err0.getMessage());
+ TestDebugLog1.printKeyAndPartMessages("test_debug.txt", e.getKey(), node.affinity(cache.getName()).partition(e.getKey()), CU.cacheId(cache.getName()));
System.exit(1);
}
}
[7/7] ignite git commit: 6467
Posted by sb...@apache.org.
6467
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ff084537
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ff084537
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ff084537
Branch: refs/heads/ignite-6467
Commit: ff084537a0c4ad417e7eb60bf3d8c39987ad98db
Parents: ebdf7b9
Author: sboikov <sb...@apache.org>
Authored: Fri Jul 27 18:01:20 2018 +0300
Committer: sboikov <sb...@apache.org>
Committed: Fri Jul 27 18:01:20 2018 +0300
----------------------------------------------------------------------
modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java | 2 ++
.../cache/distributed/dht/GridDhtPartitionTopologyImpl.java | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/ff084537/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java b/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
index 318028c..a33390c 100644
--- a/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
+++ b/modules/core/src/main/java/org/apache/ignite/TestDebugLog1.java
@@ -431,6 +431,8 @@ public class TestDebugLog1 {
}
public static void printKeyAndPartMessages(String fileName, Object key, int partId, int cacheId) {
+ fileName = null;
+
assert key != null;
List<Object> msgs0;
http://git-wip-us.apache.org/repos/asf/ignite/blob/ff084537/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 324048f..aa43b2f 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
@@ -912,7 +912,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
else if (loc != null && state == RENTING && !showRenting) {
throw new GridDhtInvalidPartitionException(p, "Adding entry to partition that is concurrently " +
"evicted [grp=" + grp.cacheOrGroupName() + ", part=" + p + ", shouldBeMoving="
- + ", belongs=" + belongs + ", belongs0=" + partitionLocalNode(p, this.readyTopVer) + ", topVer=" + topVer + ", curTopVer=" + this.readyTopVer + "]");
+ + ", belongs=" + belongs + ", topVer=" + topVer + ", curTopVer=" + this.readyTopVer + "]");
}
if (loc == null) {
[2/7] ignite git commit: ignite-6467
Posted by sb...@apache.org.
ignite-6467
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b79faa3f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b79faa3f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b79faa3f
Branch: refs/heads/ignite-6467
Commit: b79faa3fd7e3c2049d0cf6e9ee067270326fa780
Parents: 6899948
Author: sboikov <sb...@gridgain.com>
Authored: Tue Jul 24 09:18:24 2018 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Jul 24 09:18:24 2018 +0300
----------------------------------------------------------------------
.../distributed/CacheExchangeMergeTest.java | 944 -------------------
.../testsuites/IgniteCacheTestSuite6.java | 57 +-
2 files changed, 2 insertions(+), 999 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/b79faa3f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index 39b5fcb..c81883d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -206,206 +206,6 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
- public void testDelayExchangeMessages() throws Exception {
- testDelaySpi = true;
-
- System.setProperty(IgniteSystemProperties.IGNITE_EXCHANGE_MERGE_DELAY, "2000");
-
- try {
- final int srvs = 6;
- final int clients = 3;
-
- startGridsMultiThreaded(srvs);
-
- for (int i = 0; i < clients; i++) {
- client.set(true);
-
- startGrid(srvs + i);
- }
-
- final int initNodes = srvs + clients;
-
- final AtomicInteger stopIdx = new AtomicInteger();
-
- IgniteInternalFuture stopFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- Thread.sleep(ThreadLocalRandom.current().nextLong(500) + 1);
-
- stopGrid(stopIdx.incrementAndGet());
-
- return null;
- }
- }, 3, "stop-srv");
-
- final AtomicInteger startIdx = new AtomicInteger(initNodes);
-
- IgniteInternalFuture startFut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- int nodeIdx = startIdx.incrementAndGet();
-
- if (rnd.nextInt(3) == 0) {
- log.info("Start client: " + nodeIdx);
-
- client.set(true);
- }
- else
- log.info("Start server: " + nodeIdx);
-
- startGrid(nodeIdx);
-
- if (rnd.nextBoolean()) {
- log.info("Stop started node: " + nodeIdx);
-
- stopGrid(nodeIdx);
- }
-
- return null;
- }
- }, 5, "start-node");
-
- stopFut.get();
- startFut.get();
-
- checkCaches();
- }
- finally {
- System.clearProperty(IgniteSystemProperties.IGNITE_EXCHANGE_MERGE_DELAY);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeStartRandomClientsServers() throws Exception {
- for (int iter = 0; iter < 3; iter++) {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- final int srvs = rnd.nextInt(3) + 1;
- final int clients = rnd.nextInt(3);
-
- log.info("Iteration [iter=" + iter + ", srvs=" + srvs + ", clients=" + clients + ']');
-
- Ignite srv0 = startGrids(srvs);
-
- for (int i = 0; i < clients; i++) {
- client.set(true);
-
- startGrid(srvs + i);
- }
-
- final int threads = 8;
-
- final int initNodes = srvs + clients;
-
- mergeExchangeWaitVersion(srv0, initNodes + threads);
-
- final AtomicInteger idx = new AtomicInteger(initNodes);
-
- IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- int nodeIdx = idx.incrementAndGet();
-
- if (rnd.nextInt(3) == 0) {
- log.info("Start client: " + nodeIdx);
-
- client.set(true);
- }
- else
- log.info("Start server: " + nodeIdx);
-
- startGrid(nodeIdx);
-
- return null;
- }
- }, threads, "test-thread");
-
- fut.get();
-
- checkCaches();
-
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeStartStopRandomClientsServers() throws Exception {
- for (int iter = 0; iter < 3; iter++) {
- log.info("Iteration: " + iter);
-
- final int srvs = 5;
- final int clients = 5;
-
- Ignite srv0 = startGrids(srvs);
-
- for (int i = 0; i < clients; i++) {
- client.set(true);
-
- startGrid(srvs + i);
- }
-
- final int threads = 8;
-
- final int initNodes = srvs + clients;
-
- mergeExchangeWaitVersion(srv0, initNodes + threads);
-
- final AtomicInteger idx = new AtomicInteger(initNodes);
-
- final ConcurrentHashSet<Integer> stopNodes = new ConcurrentHashSet<>();
-
- IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
- if (rnd.nextBoolean()) {
- Integer stopIdx;
-
- for (;;) {
- stopIdx = rnd.nextInt(initNodes - 1) + 1;
-
- if (stopNodes.add(stopIdx))
- break;
- }
-
- log.info("Stop node: " + stopIdx);
-
- stopGrid(getTestIgniteInstanceName(stopIdx), true, false);
- }
- else {
- int nodeIdx = idx.incrementAndGet();
-
- if (rnd.nextInt(5) == 0) {
- log.info("Start client: " + nodeIdx);
-
- client.set(true);
- }
- else
- log.info("Start server: " + nodeIdx);
-
- startGrid(nodeIdx);
- }
-
- return null;
- }
- }, threads, "test-thread");
-
- fut.get();
-
- checkCaches();
-
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
public void testConcurrentStartServers() throws Exception {
concurrentStart(false);
}
@@ -461,750 +261,6 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
- public void testMergeServerAndClientJoin1() throws Exception {
- final IgniteEx srv0 = startGrid(0);
-
- mergeExchangeWaitVersion(srv0, 3);
-
- IgniteInternalFuture<?> fut1 = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- startGrid(1);
-
- return null;
- }
- }, 1, "start-srv");
-
- waitForExchangeStart(srv0, 2);
-
- IgniteInternalFuture<?> fut2 = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- client.set(true);
-
- startGrid(2);
-
- return null;
- }
- }, 1, "start-client");
-
- fut1.get();
- fut2.get();
-
- checkCaches();
-
- checkExchanges(srv0, 1, 3);
- checkExchanges(ignite(1), 3);
- checkExchanges(ignite(2), 3);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartCacheOnJoinAndJoinMerge_2_nodes() throws Exception {
- startCacheOnJoinAndJoinMerge1(2, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartCacheOnJoinAndJoinMerge_4_nodes() throws Exception {
- startCacheOnJoinAndJoinMerge1(4, false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartCacheOnJoinAndJoinMerge_WithClients() throws Exception {
- startCacheOnJoinAndJoinMerge1(5, true);
- }
-
- /**
- * @param nodes Number of nodes to start.
- * @param withClients If {@code true} starts both servers and clients.
- * @throws Exception If failed.
- */
- private void startCacheOnJoinAndJoinMerge1(int nodes, boolean withClients) throws Exception {
- cfgCache = false;
-
- final IgniteEx srv0 = startGrid(0);
-
- mergeExchangeWaitVersion(srv0, nodes + 1);
-
- if (withClients) {
- clientC = new IgniteClosure<String, Boolean>() {
- @Override public Boolean apply(String nodeName) {
- return getTestIgniteInstanceIndex(nodeName) % 2 == 0;
- }
- };
- }
-
- cfgCache = true;
-
- IgniteInternalFuture fut = startGridsAsync(srv0, 1, nodes);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeAndHistoryCleanup() throws Exception {
- final int histSize = 5;
-
- String oldHistVal = System.getProperty(IGNITE_EXCHANGE_HISTORY_SIZE);
-
- System.setProperty(IGNITE_EXCHANGE_HISTORY_SIZE, String.valueOf(histSize));
-
- try {
- final Ignite srv0 = startGrid(0);
-
- int topVer = 1;
-
- for (int i = 0; i < 3; i++) {
- mergeExchangeWaitVersion(srv0, topVer + 3);
-
- startGridsAsync(srv0, topVer, 3).get();
-
- topVer += 3;
- }
-
- checkHistorySize(histSize);
-
- awaitPartitionMapExchange();
-
- checkHistorySize(histSize);
-
- mergeExchangeWaitVersion(srv0, topVer + 2);
-
- stopGrid(1);
- stopGrid(2);
-
- checkHistorySize(histSize);
-
- awaitPartitionMapExchange();
-
- checkHistorySize(histSize);
- }
- finally {
- if (oldHistVal != null)
- System.setProperty(IGNITE_EXCHANGE_HISTORY_SIZE, oldHistVal);
- else
- System.clearProperty(IGNITE_EXCHANGE_HISTORY_SIZE);
- }
- }
-
- /**
- * @param histSize History size.
- */
- private void checkHistorySize(int histSize) {
- List<Ignite> nodes = G.allGrids();
-
- assertTrue(nodes.size() > 0);
-
- for (Ignite node : nodes) {
- List<GridDhtPartitionsExchangeFuture> exchFuts =
- ((IgniteEx)node).context().cache().context().exchange().exchangeFutures();
-
- assertTrue("Unexpected size: " + exchFuts.size(), exchFuts.size() > 0 && exchFuts.size() <= histSize);
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartCacheOnJoinAndMergeWithFail() throws Exception {
- cfgCache = false;
-
- final Ignite srv0 = startGrids(2);
-
- mergeExchangeWaitVersion(srv0, 5);
-
- cfgCache = true;
-
- IgniteInternalFuture fut = startGridsAsync(srv0, 2, 2);
-
- stopGrid(1);
-
- fut.get();
-
- checkCaches();
-
- checkExchanges(srv0, 1, 2, 3, 5);
- checkExchanges(ignite(2), 3, 5);
- checkExchanges(ignite(3), 5);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartCacheOnJoinAndCoordinatorFailed1() throws Exception {
- cfgCache = false;
-
- final Ignite srv0 = startGrids(2);
-
- mergeExchangeWaitVersion(srv0, 5);
-
- cfgCache = true;
-
- IgniteInternalFuture fut = startGridsAsync(srv0, 2, 2);
-
- stopGrid(0);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testStartCacheOnJoinAndCoordinatorFailed2() throws Exception {
- cfgCache = false;
-
- final Ignite srv0 = startGrid(0);
-
- mergeExchangeWaitVersion(srv0, 3);
-
- cfgCache = true;
-
- IgniteInternalFuture fut = startGridsAsync(srv0, 1, 2);
-
- stopGrid(0);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeServersJoin1() throws Exception {
- IgniteEx srv0 = startGrid(0);
-
- mergeExchangeWaitVersion(srv0, 3);
-
- final AtomicInteger idx = new AtomicInteger(1);
-
- IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- startGrid(idx.getAndIncrement());
-
- return null;
- }
- }, 2, "start-node");
-
- fut.get();
-
- checkCaches();
-
- checkExchanges(srv0, 1, 3);
- checkExchanges(ignite(1), 3);
- checkExchanges(ignite(2), 3);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeServerJoin1ClientsInTopology() throws Exception {
- IgniteEx srv0 = startGrid(0);
-
- client.set(true);
-
- startGrid(1);
-
- client.set(true);
-
- startGrid(2);
-
- mergeExchangeWaitVersion(srv0, 5);
-
- final AtomicInteger idx = new AtomicInteger(3);
-
- IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- startGrid(idx.getAndIncrement());
-
- return null;
- }
- }, 2, "start-node");
-
- fut.get();
-
- checkCaches();
-
- checkExchanges(srv0, 1, 2, 3, 5);
- checkExchanges(ignite(1), 2, 3, 5);
- checkExchanges(ignite(2), 3, 5);
- checkExchanges(ignite(3), 5);
- checkExchanges(ignite(4), 5);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeAndNewCoordinator() throws Exception {
- final Ignite srv0 = startGrids(3);
-
- mergeExchangeWaitVersion(srv0, 6);
-
- IgniteInternalFuture fut = startGridsAsync(srv0, 3, 3);
-
- fut.get();
-
- checkCaches();
-
- stopGrid(0);
-
- checkCaches();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeServersFail1_1() throws Exception {
- mergeServersFail1(false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeServersFail1_2() throws Exception {
- mergeServersFail1(true);
- }
-
- /**
- * @param waitRebalance Wait for rebalance end before start tested topology change.
- * @throws Exception If failed.
- */
- private void mergeServersFail1(boolean waitRebalance) throws Exception {
- final Ignite srv0 = startGrids(5);
-
- if (waitRebalance)
- awaitPartitionMapExchange();
-
- final List<DiscoveryEvent> mergedEvts = new ArrayList<>();
-
- mergeExchangeWaitVersion(srv0, 8, mergedEvts);
-
- UUID grid3Id = grid(3).localNode().id();
- UUID grid2Id = grid(2).localNode().id();
-
- stopGrid(getTestIgniteInstanceName(4), true, false);
- stopGrid(getTestIgniteInstanceName(3), true, false);
- stopGrid(getTestIgniteInstanceName(2), true, false);
-
- checkCaches();
-
- awaitPartitionMapExchange();
-
- assertTrue("Unexpected number of merged disco events: " + mergedEvts.size(), mergedEvts.size() == 2);
-
- for (DiscoveryEvent discoEvt : mergedEvts) {
- ClusterNode evtNode = discoEvt.eventNode();
-
- assertTrue("eventNode is null for DiscoEvent " + discoEvt, evtNode != null);
-
- assertTrue("Unexpected eventNode ID: "
- + evtNode.id() + " while expecting " + grid2Id + " or " + grid3Id,
- evtNode.id().equals(grid2Id) || evtNode.id().equals(grid3Id));
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeServersAndClientsFail1() throws Exception {
- mergeServersAndClientsFail(false);
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeServersAndClientsFail2() throws Exception {
- mergeServersAndClientsFail(true);
- }
-
-
- /**
- * @param waitRebalance Wait for rebalance end before start tested topology change.
- * @throws Exception If failed.
- */
- private void mergeServersAndClientsFail(boolean waitRebalance) throws Exception {
- clientC = new IgniteClosure<String, Boolean>() {
- @Override public Boolean apply(String nodeName) {
- return nodeName.equals(getTestIgniteInstanceName(2)) || nodeName.equals(getTestIgniteInstanceName(3));
- }
- };
-
- final Ignite srv0 = startGrids(6);
-
- if (waitRebalance)
- awaitPartitionMapExchange();
-
- mergeExchangeWaitVersion(srv0, 10);
-
- stopGrid(getTestIgniteInstanceName(1), true, false);
- stopGrid(getTestIgniteInstanceName(2), true, false);
- stopGrid(getTestIgniteInstanceName(3), true, false);
- stopGrid(getTestIgniteInstanceName(4), true, false);
-
- checkAffinity();
-
- mergeExchangeWaitVersion(srv0, 12);
-
- IgniteInternalFuture fut = startGridsAsync(srv0, 6, 2);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testJoinExchangeCoordinatorChange_NoMerge_1() throws Exception {
- for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
- exchangeCoordinatorChangeNoMerge(4, true, mode);
-
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testJoinExchangeCoordinatorChange_NoMerge_2() throws Exception {
- for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
- exchangeCoordinatorChangeNoMerge(8, true, mode);
-
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testFailExchangeCoordinatorChange_NoMerge_1() throws Exception {
- for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
- exchangeCoordinatorChangeNoMerge(5, false, mode);
-
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testFailExchangeCoordinatorChange_NoMerge_2() throws Exception {
- for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
- exchangeCoordinatorChangeNoMerge(8, false, mode);
-
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeJoinExchangesCoordinatorChange1_4_servers() throws Exception {
- for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
- mergeJoinExchangesCoordinatorChange1(4, mode);
-
- stopAllGrids();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeJoinExchangesCoordinatorChange1_8_servers() throws Exception {
- for (CoordinatorChangeMode mode : CoordinatorChangeMode.values()) {
- mergeJoinExchangesCoordinatorChange1(8, mode);
-
- stopAllGrids();
- }
- }
-
- /**
- * @param srvs Number of server nodes.
- * @param mode Test mode.
- * @throws Exception If failed.
- */
- private void mergeJoinExchangesCoordinatorChange1(final int srvs, CoordinatorChangeMode mode)
- throws Exception
- {
- log.info("Test mergeJoinExchangesCoordinatorChange1 [srvs=" + srvs + ", mode=" + mode + ']');
-
- testSpi = true;
-
- Ignite srv0 = startGrids(srvs);
-
- mergeExchangeWaitVersion(srv0, 6);
-
- CountDownLatch latch = blockExchangeFinish(srvs, mode);
-
- IgniteInternalFuture<?> fut = startGridsAsync(srv0, srvs, 2);
-
- if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
- fail("Failed to wait for expected messages.");
-
- stopGrid(getTestIgniteInstanceName(0), true, false);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeJoinExchangesCoordinatorChange2_4_servers() throws Exception {
- mergeJoinExchangeCoordinatorChange2(4, 2, F.asList(1, 2, 3, 4), F.asList(5));
-
- stopAllGrids();
-
- mergeJoinExchangeCoordinatorChange2(4, 2, F.asList(1, 2, 3, 5), F.asList(4));
- }
-
- /**
- * @param srvs Number of server nodes.
- * @param startNodes Number of nodes to start.
- * @param blockNodes Nodes which do not receive messages.
- * @param waitMsgNodes Nodes which should receive messages.
- * @throws Exception If failed.
- */
- private void mergeJoinExchangeCoordinatorChange2(final int srvs,
- final int startNodes,
- List<Integer> blockNodes,
- List<Integer> waitMsgNodes) throws Exception
- {
- testSpi = true;
-
- Ignite srv0 = startGrids(srvs);
-
- mergeExchangeWaitVersion(srv0, srvs + startNodes);
-
- CountDownLatch latch = blockExchangeFinish(srv0, srvs + 1, blockNodes, waitMsgNodes);
-
- IgniteInternalFuture<?> fut = startGridsAsync(srv0, srvs, startNodes);
-
- if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
- fail("Failed to wait for expected messages.");
-
- stopGrid(getTestIgniteInstanceName(0), true, false);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testMergeExchangeCoordinatorChange4() throws Exception {
- testSpi = true;
-
- final int srvs = 4;
-
- Ignite srv0 = startGrids(srvs);
-
- mergeExchangeWaitVersion(srv0, 6);
-
- final AtomicInteger idx = new AtomicInteger(srvs);
-
- CountDownLatch latch = blockExchangeFinish(srv0, 5, F.asList(1, 2, 3, 4), F.asList(5));
-
- IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Void>() {
- @Override public Void call() throws Exception {
- startGrid(idx.getAndIncrement());
-
- return null;
- }
- }, 2, "start-node");
-
- if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
- fail("Failed to wait for expected messages.");
-
- stopGrid(getTestIgniteInstanceName(0), true, false);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @param srvs Number of servers.
- * @param join If {@code true} starts new node, otherwise stops node.
- * @param mode Tested scenario.
- * @throws Exception If failed.
- */
- private void exchangeCoordinatorChangeNoMerge(int srvs, final boolean join, CoordinatorChangeMode mode) throws Exception {
- log.info("Test mergeJoinExchangeCoordinatorChange [nodes=" + srvs + ", mode=" + mode + ']');
-
- testSpi = true;
-
- final int nodes = srvs;
-
- startGrids(nodes);
-
- CountDownLatch latch = blockExchangeFinish(srvs, mode);
-
- IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable() {
- @Override public Object call() throws Exception {
- if (join)
- startGrid(nodes);
- else
- stopGrid(nodes - 1);
-
- return null;
- }
- });
-
- waitForExchangeStart(ignite(0), nodes + 1);
-
- if (latch != null && !latch.await(WAIT_SECONDS, TimeUnit.SECONDS))
- fail("Failed to wait for expected messages.");
-
- stopGrid(0);
-
- fut.get();
-
- checkCaches();
- }
-
- /**
- * @param srvs Number of server nodes.
- * @param mode Test scenario.
- * @return Awaited state latch.
- * @throws Exception If failed.
- */
- private CountDownLatch blockExchangeFinish(int srvs, CoordinatorChangeMode mode) throws Exception {
- Ignite crd = ignite(0);
-
- long topVer = srvs + 1;
-
- switch (mode) {
- case NOBODY_RCVD: {
- blockExchangeFinish(crd, topVer);
-
- break;
- }
-
- case NEW_CRD_RCDV: {
- List<Integer> finishNodes = F.asList(1);
-
- return blockExchangeFinish(crd, topVer, blockNodes(srvs, finishNodes), finishNodes);
- }
-
- case NON_CRD_RCVD: {
- assert srvs > 2 : srvs;
-
- List<Integer> finishNodes = F.asList(2);
-
- return blockExchangeFinish(crd, topVer, blockNodes(srvs, finishNodes), finishNodes);
- }
-
- default:
- fail();
- }
-
- return null;
- }
-
- /**
- * @param srvs Number of servers.
- * @param waitNodes Nodes which should receive message.
- * @return Blocked nodes indexes.
- */
- private List<Integer> blockNodes(int srvs, List<Integer> waitNodes) {
- List<Integer> block = new ArrayList<>();
-
- for (int i = 0; i < srvs + 1; i++) {
- if (!waitNodes.contains(i))
- block.add(i);
- }
-
- return block;
- }
-
- /**
- * @param crd Exchange coordinator.
- * @param topVer Exchange topology version.
- */
- private void blockExchangeFinish(Ignite crd, long topVer) {
- final AffinityTopologyVersion topVer0 = new AffinityTopologyVersion(topVer);
-
- TestRecordingCommunicationSpi.spi(crd).blockMessages(new IgniteBiPredicate<ClusterNode, Message>() {
- @Override public boolean apply(ClusterNode node, Message msg) {
- if (msg instanceof GridDhtPartitionsFullMessage) {
- GridDhtPartitionsFullMessage msg0 = (GridDhtPartitionsFullMessage)msg;
-
- return msg0.exchangeId() != null && msg0.exchangeId().topologyVersion().equals(topVer0);
- }
-
- return false;
- }
- });
- }
-
- /**
- * @param crd Exchange coordinator.
- * @param topVer Exchange topology version.
- * @param blockNodes Nodes which do not receive messages.
- * @param waitMsgNodes Nodes which should receive messages.
- * @return Awaited state latch.
- */
- private CountDownLatch blockExchangeFinish(Ignite crd,
- long topVer,
- final List<Integer> blockNodes,
- final List<Integer> waitMsgNodes)
- {
- log.info("blockExchangeFinish [crd=" + crd.cluster().localNode().id() +
- ", block=" + blockNodes +
- ", wait=" + waitMsgNodes + ']');
-
- final AffinityTopologyVersion topVer0 = new AffinityTopologyVersion(topVer);
-
- final CountDownLatch latch = new CountDownLatch(waitMsgNodes.size());
-
- TestRecordingCommunicationSpi.spi(crd).blockMessages(new IgniteBiPredicate<ClusterNode, Message>() {
- @Override public boolean apply(ClusterNode node, Message msg) {
- if (msg instanceof GridDhtPartitionsFullMessage) {
- GridDhtPartitionsFullMessage msg0 = (GridDhtPartitionsFullMessage)msg;
-
- if (msg0.exchangeId() == null || msg0.exchangeId().topologyVersion().compareTo(topVer0) < 0)
- return false;
-
- String name = node.attribute(IgniteNodeAttributes.ATTR_IGNITE_INSTANCE_NAME);
-
- assert name != null : node;
-
- for (Integer idx : blockNodes) {
- if (name.equals(getTestIgniteInstanceName(idx)))
- return true;
- }
-
- for (Integer idx : waitMsgNodes) {
- if (name.equals(getTestIgniteInstanceName(idx))) {
- log.info("Coordinators sends awaited message [node=" + node.id() + ']');
-
- latch.countDown();
- }
- }
- }
-
- return false;
- }
- });
-
- return latch;
- }
-
- /**
- * @throws Exception If failed.
- */
private void checkCaches() throws Exception {
checkAffinity();
http://git-wip-us.apache.org/repos/asf/ignite/blob/b79faa3f/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
index 77285be..347e32a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
@@ -67,61 +67,8 @@ public class IgniteCacheTestSuite6 extends TestSuite {
public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("IgniteCache Test Suite part 6");
- suite.addTestSuite(CachePartitionStateTest.class);
-
- suite.addTestSuite(GridCachePartitionEvictionDuringReadThroughSelfTest.class);
- suite.addTestSuite(IgniteOptimisticTxSuspendResumeTest.class);
- suite.addTestSuite(IgniteOptimisticTxSuspendResumeMultiServerTest.class);
- suite.addTestSuite(IgnitePessimisticTxSuspendResumeTest.class);
-
- suite.addTestSuite(CacheExchangeMergeTest.class);
-
- suite.addTestSuite(TxRollbackOnTimeoutTest.class);
- suite.addTestSuite(TxRollbackOnTimeoutNoDeadlockDetectionTest.class);
- suite.addTestSuite(TxRollbackOnTimeoutNearCacheTest.class);
- suite.addTestSuite(TxWithSmallTimeoutAndContentionOneKeyTest.class);
- suite.addTestSuite(IgniteCacheThreadLocalTxTest.class);
- suite.addTestSuite(TxRollbackAsyncTest.class);
- suite.addTestSuite(TxRollbackAsyncNearCacheTest.class);
- suite.addTestSuite(TxRollbackAsyncWithPersistenceTest.class);
- suite.addTestSuite(TxRollbackOnTopologyChangeTest.class);
-
- suite.addTestSuite(TxOptimisticPrepareOnUnstableTopologyTest.class);
-
- suite.addTestSuite(TxLabelTest.class);
-
- suite.addTestSuite(TxMultiCacheAsyncOpsTest.class);
-
- suite.addTestSuite(TxOnCachesStartTest.class);
-
- suite.addTestSuite(IgnitePdsCacheAssignmentNodeRestartsTest.class);
-
- suite.addTestSuite(WalModeChangeSelfTest.class);
- suite.addTestSuite(WalModeChangeCoordinatorNotAffinityNodeSelfTest.class);
- suite.addTestSuite(WalModeChangeAdvancedSelfTest.class);
-
- suite.addTestSuite(IgniteCache150ClientsTest.class);
-
-// TODO enable this test after IGNITE-6753, now it takes too long
-// suite.addTestSuite(IgniteOutOfMemoryPropagationTest.class);
-
- suite.addTestSuite(AuthenticationConfigurationClusterTest.class);
- suite.addTestSuite(AuthenticationProcessorSelfTest.class);
- suite.addTestSuite(AuthenticationOnNotActiveClusterTest.class);
- suite.addTestSuite(AuthenticationProcessorNodeRestartTest.class);
- suite.addTestSuite(AuthenticationProcessorNPEOnStartTest.class);
-
- suite.addTestSuite(ReplicatedAtomicCacheGetsDistributionTest.class);
- suite.addTestSuite(ReplicatedTransactionalOptimisticCacheGetsDistributionTest.class);
- suite.addTestSuite(ReplicatedTransactionalPessimisticCacheGetsDistributionTest.class);
-
- suite.addTestSuite(PartitionedAtomicCacheGetsDistributionTest.class);
- suite.addTestSuite(PartitionedTransactionalOptimisticCacheGetsDistributionTest.class);
- suite.addTestSuite(PartitionedTransactionalPessimisticCacheGetsDistributionTest.class);
-
- suite.addTestSuite(TxOptimisticOnPartitionExchangeTest.class);
-
- suite.addTestSuite(IgniteExchangeLatchManagerCoordinatorFailTest.class);
+ for (int i = 0; i < 10; i++)
+ suite.addTestSuite(CacheExchangeMergeTest.class);
return suite;
}
[6/7] ignite git commit: 6467
Posted by sb...@apache.org.
6467
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ebdf7b96
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ebdf7b96
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ebdf7b96
Branch: refs/heads/ignite-6467
Commit: ebdf7b969394458e33114ecc43b95340cd70b81b
Parents: 1775991 bf5287b
Author: sboikov <sb...@apache.org>
Authored: Fri Jul 27 17:53:15 2018 +0300
Committer: sboikov <sb...@apache.org>
Committed: Fri Jul 27 17:53:15 2018 +0300
----------------------------------------------------------------------
assembly/LICENSE_FABRIC | 2 +-
docker/apache-ignite/Dockerfile | 9 +
docker/apache-ignite/run.sh | 2 +-
docker/web-agent/Dockerfile | 3 +-
.../OptimizeMakeChangeFitnessFunction.java | 1 -
.../change/OptimizeMakeChangeGAExample.java | 2 -
.../OptimizeMakeChangeTerminateCriteria.java | 2 -
.../genetic/helloworld/HelloWorldGAExample.java | 2 -
.../helloworld/HelloWorldTerminateCriteria.java | 2 -
.../ml/genetic/knapsack/KnapsackGAExample.java | 2 -
.../knapsack/KnapsackTerminateCriteria.java | 1 -
.../ml/genetic/movie/MovieFitnessFunction.java | 1 -
.../ml/genetic/movie/MovieGAExample.java | 2 -
.../genetic/movie/MovieTerminateCriteria.java | 2 -
.../ml/knn/KNNClassificationExample.java | 2 +-
.../examples/ml/knn/KNNRegressionExample.java | 2 +-
.../examples/ml/nn/MLPTrainerExample.java | 2 +-
.../ml/preprocessing/BinarizationExample.java | 2 +-
.../ml/preprocessing/ImputingExample.java | 2 +-
.../ImputingExampleWithMostFrequentValues.java | 2 +-
.../ml/preprocessing/MinMaxScalerExample.java | 2 +-
.../ml/preprocessing/NormalizationExample.java | 2 +-
...ssionLSQRTrainerWithMinMaxScalerExample.java | 2 +-
...gressionMultiClassClassificationExample.java | 2 +-
.../SVMMultiClassClassificationExample.java | 2 +-
.../RandomForestRegressionExample.java | 18 +-
.../ml/tutorial/Step_1_Read_and_Learn.java | 2 +-
.../examples/ml/tutorial/Step_2_Imputing.java | 2 +-
.../examples/ml/tutorial/Step_3_Categorial.java | 2 +-
.../ml/tutorial/Step_4_Add_age_fare.java | 2 +-
.../examples/ml/tutorial/Step_5_Scaling.java | 2 +-
.../ignite/examples/ml/tutorial/Step_6_KNN.java | 2 +-
.../ml/tutorial/Step_7_Split_train_test.java | 2 +-
.../ignite/examples/ml/tutorial/Step_8_CV.java | 2 +-
.../ml/tutorial/Step_8_CV_with_Param_Grid.java | 173 ++
.../ml/tutorial/Step_9_Go_to_LogReg.java | 2 +-
modules/cassandra/store/pom.xml | 2 +-
.../java/org/apache/ignite/IgniteCache.java | 5 +
.../java/org/apache/ignite/IgniteCluster.java | 7 +
.../apache/ignite/IgniteSystemProperties.java | 3 +
.../rendezvous/RendezvousAffinityFunction.java | 6 +
.../configuration/BasicAddressResolver.java | 9 +
.../configuration/ConnectorConfiguration.java | 8 +
.../configuration/DataStorageConfiguration.java | 2 +
.../configuration/HadoopConfiguration.java | 4 +-
.../configuration/MemoryConfiguration.java | 6 +
.../MemoryPolicyConfiguration.java | 6 +
.../configuration/TransactionConfiguration.java | 6 +
.../ignite/internal/GridKernalContext.java | 7 +
.../ignite/internal/GridKernalContextImpl.java | 14 +-
.../apache/ignite/internal/IgniteKernal.java | 4 +
.../org/apache/ignite/internal/IgnitionEx.java | 13 +-
.../ignite/internal/LongJVMPauseDetector.java | 9 +
.../internal/binary/BinaryMarshaller.java | 8 +
.../cluster/IgniteClusterAsyncImpl.java | 5 +
.../internal/cluster/IgniteClusterImpl.java | 15 +
.../optimized/OptimizedMarshaller.java | 8 +-
.../internal/pagemem/wal/record/DataEntry.java | 12 +
.../pagemem/wal/record/LazyDataEntry.java | 3 +
.../cache/CacheClusterMetricsMXBeanImpl.java | 7 +-
.../cache/CacheJoinNodeDiscoveryData.java | 26 +-
.../cache/CacheStatisticsClearMessage.java | 125 ++
.../cache/GatewayProtectedCacheProxy.java | 12 +
.../processors/cache/GridCacheProcessor.java | 128 +-
.../processors/cache/IgniteCacheProxyImpl.java | 10 +
.../CacheDataStructuresManager.java | 27 +-
.../GridDistributedTxRemoteAdapter.java | 44 +-
.../dht/GridDhtTransactionalCacheAdapter.java | 176 +-
...arOptimisticSerializableTxPrepareFuture.java | 4 -
.../near/GridNearOptimisticTxPrepareFuture.java | 12 +-
...ridNearOptimisticTxPrepareFutureAdapter.java | 39 +
.../GridNearPessimisticTxPrepareFuture.java | 5 +
.../cache/distributed/near/GridNearTxLocal.java | 25 +-
.../near/GridNearTxPrepareFutureAdapter.java | 5 +
.../wal/reader/StandaloneGridKernalContext.java | 5 +
.../wal/serializer/RecordDataV1Serializer.java | 4 +
.../cache/transactions/IgniteTxManager.java | 11 +-
.../datastructures/DataStructuresProcessor.java | 55 +-
.../datastructures/GridCacheSetHeader.java | 31 +-
.../datastructures/GridCacheSetImpl.java | 134 +-
.../datastructures/GridCacheSetItemKey.java | 5 +-
.../datastructures/GridCacheSetProxy.java | 18 +
.../internal/processors/query/QueryUtils.java | 3 +
.../ignite/internal/util/IgniteUtils.java | 16 +
.../util/nio/GridNioMetricsListener.java | 6 +-
.../util/nio/GridNioServerListener.java | 5 +-
.../communication/CommunicationListener.java | 5 +-
.../communication/tcp/TcpCommunicationSpi.java | 38 +-
.../spi/deployment/DeploymentListener.java | 6 +-
.../ignite/spi/discovery/tcp/ServerImpl.java | 31 +-
.../spi/discovery/tcp/TcpDiscoverySpiMBean.java | 2 +-
.../ignite/startup/BasicWarmupClosure.java | 10 +-
.../resources/META-INF/classnames.properties | 1 +
.../cache/CacheMetricsEnableRuntimeTest.java | 403 ----
.../cache/CacheMetricsManageTest.java | 542 +++++
...CacheFullTextQueryMultithreadedSelfTest.java | 11 +-
.../GridCacheSetAbstractSelfTest.java | 50 +-
.../IgniteCollectionAbstractTest.java | 11 +
.../IgniteDataStructureWithJobTest.java | 10 +-
.../distributed/CacheExchangeMergeTest.java | 5 +-
.../CacheLateAffinityAssignmentTest.java | 2 -
...niteCacheClientNodeChangingTopologyTest.java | 95 +
...gniteAtomicLongChangingTopologySelfTest.java | 18 +
...ReplicatedFullApiMultithreadedSelfTest1.java | 1980 ------------------
...PdsAtomicCacheHistoricalRebalancingTest.java | 5 +
.../IgnitePdsCacheRebalancingAbstractTest.java | 179 +-
.../IgnitePdsTxCacheRebalancingTest.java | 1 -
.../IgnitePdsTxHistoricalRebalancingTest.java | 64 +
.../AbstractNodeJoinTemplate.java | 8 +-
...ollbackOnTimeoutNoDeadlockDetectionTest.java | 4 -
.../transactions/TxRollbackOnTimeoutTest.java | 19 +-
.../internal/util/IgniteUtilsSelfTest.java | 29 +
.../TcpDiscoverySpiFailureTimeoutSelfTest.java | 4 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
.../multijvm/IgniteCacheProcessProxy.java | 5 +
.../multijvm/IgniteClusterProcessProxy.java | 5 +
.../IgniteCacheMetricsSelfTestSuite.java | 4 +-
.../IgniteHadoopFileSystemAbstractSelfTest.java | 2 +
modules/indexing/pom.xml | 7 +
.../processors/query/h2/IgniteH2Indexing.java | 85 +-
.../query/h2/ddl/DdlStatementsProcessor.java | 28 +-
.../query/h2/dml/UpdatePlanBuilder.java | 15 +-
.../query/h2/sql/GridSqlQuerySplitter.java | 12 +-
.../processors/query/h2/sys/SqlSystemIndex.java | 143 ++
.../processors/query/h2/sys/SqlSystemTable.java | 208 ++
.../query/h2/sys/SqlSystemTableEngine.java | 60 +
.../h2/sys/view/SqlAbstractLocalSystemView.java | 104 +
.../h2/sys/view/SqlAbstractSystemView.java | 134 ++
.../query/h2/sys/view/SqlSystemView.java | 79 +
.../sys/view/SqlSystemViewColumnCondition.java | 102 +
.../query/h2/sys/view/SqlSystemViewNodes.java | 116 +
.../query/SqlSystemViewsSelfTest.java | 247 +++
.../IgniteCacheQuerySelfTestSuite.java | 2 +
.../IgnitePdsWithIndexingCoreTestSuite.java | 9 +-
.../main/java/org/apache/ignite/ml/Model.java | 7 +
.../ml/clustering/kmeans/KMeansModel.java | 22 +-
.../ml/clustering/kmeans/KMeansModelFormat.java | 2 +-
.../ml/clustering/kmeans/KMeansTrainer.java | 6 +-
.../ml/composition/BaggingModelTrainer.java | 38 +-
.../ml/composition/ModelOnFeaturesSubspace.java | 19 +
.../ml/composition/ModelsComposition.java | 14 +
.../boosting/GDBBinaryClassifierTrainer.java | 2 +-
.../boosting/GDBRegressionTrainer.java | 2 +-
.../ml/composition/boosting/GDBTrainer.java | 40 +-
.../PredictionsAggregator.java | 8 +
.../WeightedPredictionsAggregator.java | 24 +
.../ignite/ml/dataset/DatasetFactory.java | 2 +-
.../dataset/impl/cache/CacheBasedDataset.java | 3 +-
.../builder/data/SimpleDatasetDataBuilder.java | 2 +-
.../data/SimpleLabeledDatasetDataBuilder.java | 2 +-
.../ml/environment/LearningEnvironment.java | 54 +
.../environment/LearningEnvironmentBuilder.java | 123 ++
.../ml/environment/logging/ConsoleLogger.java | 102 +
.../ml/environment/logging/CustomMLLogger.java | 105 +
.../ignite/ml/environment/logging/MLLogger.java | 69 +
.../ml/environment/logging/NoOpLogger.java | 64 +
.../ml/environment/logging/package-info.java | 21 +
.../ignite/ml/environment/package-info.java | 21 +
.../parallelism/DefaultParallelismStrategy.java | 85 +
.../parallelism/NoParallelismStrategy.java | 87 +
.../parallelism/ParallelismStrategy.java | 47 +
.../ml/environment/parallelism/Promise.java | 53 +
.../environment/parallelism/package-info.java | 21 +
.../apache/ignite/ml/genetic/CrossOverJob.java | 4 +-
.../apache/ignite/ml/genetic/CrossOverTask.java | 4 +-
.../apache/ignite/ml/genetic/FitnessJob.java | 4 +-
.../apache/ignite/ml/genetic/FitnessTask.java | 4 +-
.../org/apache/ignite/ml/genetic/GAGrid.java | 3 -
.../java/org/apache/ignite/ml/genetic/Gene.java | 1 -
.../apache/ignite/ml/genetic/MutateTask.java | 5 +-
.../ignite/ml/genetic/TruncateSelectionJob.java | 3 +-
.../ml/genetic/TruncateSelectionTask.java | 4 +-
.../ml/genetic/functions/GAGridFunction.java | 4 +-
.../ml/genetic/parameter/GAConfiguration.java | 1 -
.../ignite/ml/genetic/utils/GAGridUtils.java | 3 -
.../java/org/apache/ignite/ml/knn/KNNUtils.java | 2 +-
.../classification/KNNClassificationModel.java | 17 +-
.../KNNClassificationTrainer.java | 4 +-
.../ml/knn/regression/KNNRegressionModel.java | 17 +-
.../ml/knn/regression/KNNRegressionTrainer.java | 4 +-
.../java/org/apache/ignite/ml/math/Blas.java | 2 +-
.../java/org/apache/ignite/ml/math/Tracer.java | 32 +-
.../ml/math/distances/DistanceMeasure.java | 2 +-
.../ml/math/distances/EuclideanDistance.java | 2 +-
.../ml/math/distances/HammingDistance.java | 2 +-
.../ml/math/distances/ManhattanDistance.java | 2 +-
.../math/primitives/matrix/AbstractMatrix.java | 2 +-
.../primitives/matrix/impl/DenseMatrix.java | 6 +-
.../primitives/matrix/impl/SparseMatrix.java | 6 +-
.../math/primitives/matrix/impl/ViewMatrix.java | 6 +-
.../matrix/storage/DenseMatrixStorage.java | 2 +-
.../matrix/storage/SparseMatrixStorage.java | 2 +-
.../math/primitives/vector/AbstractVector.java | 2 +-
.../ml/math/primitives/vector/Vector.java | 3 +-
.../vector/impl/DelegatingVector.java | 6 +-
.../primitives/vector/impl/DenseVector.java | 6 +-
.../primitives/vector/impl/SparseVector.java | 4 +-
.../math/primitives/vector/impl/VectorView.java | 4 +-
.../vector/impl/VectorizedViewMatrix.java | 4 +-
.../storage/VectorizedViewMatrixStorage.java | 2 +-
.../apache/ignite/ml/math/util/MatrixUtil.java | 6 +-
.../org/apache/ignite/ml/nn/MLPTrainer.java | 6 +-
.../ignite/ml/nn/MultilayerPerceptron.java | 29 +-
.../ignite/ml/nn/ReplicatedVectorMatrix.java | 6 +-
.../ignite/ml/optimization/LossFunctions.java | 2 +-
.../ml/optimization/SmoothParametrized.java | 4 +-
.../NesterovUpdateCalculator.java | 4 +-
.../ParameterUpdateCalculator.java | 4 +-
.../RPropUpdateCalculator.java | 4 +-
.../SimpleGDUpdateCalculator.java | 4 +-
.../binarization/BinarizationPreprocessor.java | 2 +-
.../binarization/BinarizationTrainer.java | 2 +-
.../StringEncoderPreprocessor.java | 4 +-
.../stringencoder/StringEncoderTrainer.java | 2 +-
.../imputing/ImputerPreprocessor.java | 2 +-
.../preprocessing/imputing/ImputerTrainer.java | 2 +-
.../minmaxscaling/MinMaxScalerPreprocessor.java | 2 +-
.../minmaxscaling/MinMaxScalerTrainer.java | 2 +-
.../NormalizationPreprocessor.java | 2 +-
.../normalization/NormalizationTrainer.java | 2 +-
.../linear/FeatureExtractorWrapper.java | 2 +-
.../linear/LinearRegressionLSQRTrainer.java | 6 +-
.../linear/LinearRegressionModel.java | 9 +-
.../linear/LinearRegressionSGDTrainer.java | 4 +-
.../binomial/LogisticRegressionModel.java | 9 +-
.../binomial/LogisticRegressionSGDTrainer.java | 4 +-
.../LogRegressionMultiClassModel.java | 5 +
.../LogRegressionMultiClassTrainer.java | 4 +-
.../ignite/ml/selection/cv/CrossValidation.java | 214 +-
.../ml/selection/cv/CrossValidationResult.java | 134 ++
.../ml/selection/paramgrid/ParamGrid.java | 58 +
.../paramgrid/ParameterSetGenerator.java | 91 +
.../ml/selection/paramgrid/package-info.java | 22 +
.../cursor/CacheBasedLabelPairCursor.java | 2 +-
.../scoring/cursor/LocalLabelPairCursor.java | 2 +-
.../selection/scoring/evaluator/Evaluator.java | 2 +-
.../ignite/ml/structures/LabeledDataset.java | 2 +-
...abeledDatasetPartitionDataBuilderOnHeap.java | 2 +-
.../preprocessing/LabeledDatasetLoader.java | 2 +-
.../svm/SVMLinearBinaryClassificationModel.java | 9 +-
.../SVMLinearBinaryClassificationTrainer.java | 4 +-
.../SVMLinearMultiClassClassificationModel.java | 5 +
...VMLinearMultiClassClassificationTrainer.java | 4 +-
.../ignite/ml/trainers/DatasetTrainer.java | 26 +-
.../ml/trainers/MultiLabelDatasetTrainer.java | 2 +-
.../ml/trainers/SingleLabelDatasetTrainer.java | 2 +-
.../org/apache/ignite/ml/tree/DecisionTree.java | 62 +-
.../tree/DecisionTreeClassificationTrainer.java | 38 +
.../ml/tree/DecisionTreeConditionalNode.java | 10 +
.../ignite/ml/tree/DecisionTreeLeafNode.java | 10 +
.../ml/tree/data/DecisionTreeDataBuilder.java | 2 +-
.../org/apache/ignite/ml/util/ModelTrace.java | 130 ++
.../org/apache/ignite/ml/LocalModelsTest.java | 2 +-
.../java/org/apache/ignite/ml/TestUtils.java | 2 +-
.../ignite/ml/clustering/KMeansModelTest.java | 2 +-
.../ignite/ml/clustering/KMeansTrainerTest.java | 2 +-
.../ml/genetic/GAGridCalculateFitnessTest.java | 5 +-
.../genetic/GAGridInitializePopulationTest.java | 5 +-
.../ignite/ml/knn/KNNClassificationTest.java | 2 +-
.../apache/ignite/ml/knn/KNNRegressionTest.java | 2 +-
.../ignite/ml/knn/LabeledDatasetTest.java | 2 +-
.../org/apache/ignite/ml/math/BlasTest.java | 2 +-
.../ignite/ml/math/MathImplLocalTestSuite.java | 8 +-
.../org/apache/ignite/ml/math/TracerTest.java | 2 +-
.../matrix/MatrixBaseStorageTest.java | 1 -
.../matrix/MatrixStorageFixtures.java | 1 -
.../primitives/vector/AbstractVectorTest.java | 2 +-
.../vector/DelegatingVectorConstructorTest.java | 2 +-
.../primitives/vector/MatrixVectorViewTest.java | 2 +-
.../primitives/vector/VectorAttributesTest.java | 2 +-
.../vector/VectorBaseStorageTest.java | 1 -
.../vector/VectorImplementationsFixtures.java | 4 +-
.../vector/VectorImplementationsTest.java | 2 +-
.../primitives/vector/VectorToMatrixTest.java | 4 +-
.../java/org/apache/ignite/ml/nn/MLPTest.java | 4 +-
.../ignite/ml/nn/MLPTrainerIntegrationTest.java | 4 +-
.../org/apache/ignite/ml/nn/MLPTrainerTest.java | 2 +-
.../MLPTrainerMnistIntegrationTest.java | 2 +-
.../ml/nn/performance/MLPTrainerMnistTest.java | 2 +-
.../linear/LinearRegressionModelTest.java | 2 +-
.../logistic/LogisticRegressionModelTest.java | 2 +-
.../ignite/ml/selection/SelectionTestSuite.java | 2 +
.../paramgrid/ParameterSetGeneratorTest.java | 56 +
.../ml/svm/SVMBinaryTrainerIntegrationTest.java | 102 +
.../org/apache/ignite/ml/svm/SVMModelTest.java | 2 +-
.../org/apache/ignite/ml/svm/SVMTestSuite.java | 3 +-
.../ApiParity/CacheParityTest.cs | 3 +-
.../ApiParity/ClusterParityTest.cs | 3 +-
.../org/apache/ignite/spark/impl/package.scala | 2 +-
.../ignite/spark/AbstractDataFrameSpec.scala | 6 +-
.../spi/deployment/uri/UriDeploymentSpi.java | 4 +
modules/web-console/backend/middlewares/api.js | 5 +
.../migrations/1516948939797-migrate-configs.js | 121 +-
.../backend/migrations/migration-utils.js | 38 +-
modules/web-console/backend/package.json | 2 +-
modules/web-console/backend/routes/admin.js | 4 +-
.../backend/services/notifications.js | 4 +-
.../testcafe/fixtures/configuration/basic.js | 3 +-
.../configuration/clusterFormChangeDetection.js | 56 +
modules/web-console/e2e/testcafe/helpers.js | 4 +-
modules/web-console/e2e/testcafe/package.json | 4 +-
.../PageConfigurationAdvancedCluster.js | 8 +-
.../page-models/PageConfigurationBasic.js | 2 +-
.../page-models/PageConfigurationOverview.js | 10 +-
.../pageConfigurationAdvancedIGFS.js | 4 +-
.../pageConfigurationAdvancedModels.js | 6 +-
modules/web-console/frontend/app/app.js | 7 +-
.../components/cluster-selector/controller.js | 1 +
.../connected-clusters-badge/style.scss | 2 +-
.../components/cluster-edit-form/controller.js | 6 +-
.../cluster-edit-form/templates/binary.pug | 4 +-
.../page-configure-overview/controller.js | 5 +
.../page-configure-overview/style.scss | 2 +-
.../page-configure-overview/template.pug | 14 +-
.../page-configure/components/fakeUICanExit.js | 27 +-
.../components/fakeUICanExit.spec.js | 32 +
.../app/components/page-configure/states.js | 6 -
.../app/components/page-configure/template.pug | 10 +-
.../page-forgot-password/template.pug | 2 +-
.../app/components/page-profile/index.js | 12 +-
.../app/components/page-profile/style.scss | 3 +
.../app/components/page-profile/template.pug | 16 +-
.../components/queries-notebook/style.scss | 47 +-
.../queries-notebook/template.tpl.pug | 163 +-
.../queries-notebooks-list/controller.js | 6 +-
.../app/components/page-queries/index.js | 33 +-
.../app/components/page-signin/template.pug | 2 +-
.../app/components/page-signup/template.pug | 2 +-
.../app/components/ui-grid-hovering/style.scss | 6 +
.../components/user-notifications/service.js | 2 +-
.../components/web-console-footer/template.pug | 2 +-
.../components/web-console-header/style.scss | 7 +-
.../components/web-console-header/template.pug | 4 +-
.../frontend/app/data/getting-started.json | 30 +-
modules/web-console/frontend/app/data/i18n.js | 2 +-
.../app/modules/agent/AgentManager.service.js | 4 +-
.../agent/components/cluster-login/template.pug | 7 +-
.../app/modules/nodes/nodes-dialog.tpl.pug | 2 +-
.../frontend/app/modules/states/admin.state.js | 12 +-
.../app/modules/states/settings.state.js | 33 +
.../frontend/app/primitives/badge/index.scss | 2 +-
.../frontend/app/primitives/btn/index.scss | 5 +
.../frontend/app/services/Version.service.js | 6 +-
modules/web-console/frontend/package.json | 10 +-
.../frontend/public/images/cache.png | Bin 24791 -> 15087 bytes
.../frontend/public/images/cluster-quick.png | Bin 0 -> 16407 bytes
.../frontend/public/images/cluster.png | Bin 29376 -> 24083 bytes
.../frontend/public/images/domains.png | Bin 22131 -> 17899 bytes
.../web-console/frontend/public/images/igfs.png | Bin 14139 -> 14683 bytes
.../frontend/public/images/main-screenshot.png | Bin 86830 -> 0 bytes
.../frontend/public/images/multicluster.png | Bin 21921 -> 31178 bytes
.../frontend/public/images/preview.png | Bin 0 -> 29829 bytes
.../frontend/public/images/query-chart.png | Bin 17142 -> 0 bytes
.../frontend/public/images/query-metadata.png | Bin 39361 -> 0 bytes
.../frontend/public/images/query-table.png | Bin 28065 -> 19943 bytes
.../frontend/public/images/summary.png | Bin 33650 -> 0 bytes
.../frontend/public/stylesheets/style.scss | 73 +-
modules/web-console/frontend/views/403.tpl.pug | 2 +-
modules/web-console/frontend/views/404.tpl.pug | 2 +-
modules/web-console/frontend/views/base.pug | 4 +-
modules/web-console/frontend/views/base2.pug | 26 -
.../frontend/views/includes/header-left.pug | 2 +-
.../frontend/views/includes/header-right.pug | 2 +-
.../frontend/views/templates/dropdown.tpl.pug | 2 +-
.../frontend/webpack/webpack.common.js | 2 +-
.../discovery/zk/internal/ZookeeperClient.java | 126 +-
.../zk/internal/ZookeeperDiscoveryImpl.java | 13 +-
.../internal/ZookeeperDiscoveryStatistics.java | 7 +
.../zk/internal/ZookeeperClientTest.java | 93 +
.../zk/internal/ZookeeperDiscoverySpiTest.java | 139 +-
parent/pom.xml | 10 +-
371 files changed, 6442 insertions(+), 3587 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/ebdf7b96/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
[5/7] ignite git commit: ignite-6467
Posted by sb...@apache.org.
ignite-6467
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/17759911
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/17759911
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/17759911
Branch: refs/heads/ignite-6467
Commit: 177599115f0bfc434c98b0f5b48b2e00fd938563
Parents: b01f11b
Author: sboikov <sb...@apache.org>
Authored: Tue Jul 24 10:43:40 2018 +0300
Committer: sboikov <sb...@apache.org>
Committed: Tue Jul 24 10:43:40 2018 +0300
----------------------------------------------------------------------
.../cache/distributed/CacheExchangeMergeTest.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/17759911/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
index dbf95f4..0b6a3f3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheExchangeMergeTest.java
@@ -412,7 +412,14 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
Object val = cache.get(key);
- assertEquals(err, i, val);
+ try {
+ assertEquals(err, i, val);
+ } catch (AssertionFailedError err0) {
+ err0.printStackTrace(System.out);
+ TestDebugLog1.addMessage("0 " + err0.getMessage());
+ TestDebugLog1.printKeyAndPartMessages("test_debug.txt", key, node.affinity(cacheName).partition(key), CU.cacheId(cacheName));
+ System.exit(1);
+ }
}
for (int i = 0; i < 5; i++) {
@@ -443,7 +450,7 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
if (cache.getConfiguration(CacheConfiguration.class).getAtomicityMode() == TRANSACTIONAL) {
for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
for (TransactionIsolation isolation : TransactionIsolation.values())
- checkNodeCaches(err, node, cache, TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ);
+ checkNodeCaches(err, node, cache, concurrency, isolation);
}
}
}
@@ -490,7 +497,7 @@ public class CacheExchangeMergeTest extends GridCommonAbstractTest {
}
catch (ClusterTopologyException ignore) {
// No-op.
- ignore.printStackTrace();
+ ignore.printStackTrace(System.out);
return;
}