ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1534 debug
Date Wed, 30 Sep 2015 09:38:34 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1534 aa877d90e -> 50fe35146


ignite-1534 debug


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

Branch: refs/heads/ignite-1534
Commit: 50fe35146c5f0d16b190f6611d2dd0dca637356a
Parents: aa877d9
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Sep 30 12:38:08 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Sep 30 12:38:08 2015 +0300

----------------------------------------------------------------------
 .../managers/discovery/GridDiscoveryManager.java        |  2 ++
 .../dht/preloader/GridDhtPartitionsExchangeFuture.java  |  4 ++++
 .../org/apache/ignite/internal/util/IgniteUtils.java    | 12 ++++++++++++
 .../IgniteCacheCreatePutMultiNodeSelfTest2.java         |  3 +++
 4 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/50fe3514/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 785613d..f977d92 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -465,6 +465,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
                 final Map<Long, Collection<ClusterNode>> snapshots,
                 @Nullable DiscoverySpiCustomMessage spiCustomMsg
             ) {
+                U.sleep();
+
                 if (type == EVT_NODE_JOINED && node.isLocal() && ctx.clientDisconnected())
{
                     discoCacheHist.clear();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/50fe3514/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 a1b03c1..f6c33f2 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
@@ -503,6 +503,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
                 if (!F.isEmpty(reqs))
                     blockGateways();
 
+                U.sleep();
+
                 startCaches();
 
                 // True if client node joined or failed.
@@ -1053,6 +1055,8 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter<AffinityT
 
         cacheValidRes = m != null ? m : Collections.<Integer, Boolean>emptyMap();
 
+        U.sleep();
+
         cctx.cache().onExchangeDone(exchId.topologyVersion(), reqs, err);
 
         cctx.exchange().onExchangeDone(this, err);

http://git-wip-us.apache.org/repos/asf/ignite/blob/50fe3514/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index e5090cb..597e0e9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -116,6 +116,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 import java.util.concurrent.Semaphore;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.concurrent.locks.Condition;
@@ -9302,4 +9303,15 @@ public abstract class IgniteUtils {
             throw new IgniteInterruptedCheckedException(e);
         }
     }
+
+    public static void sleep() {
+        try {
+            Thread.sleep(ThreadLocalRandom.current().nextLong(300) + 100);
+        }
+        catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+
+            e.printStackTrace();
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/50fe3514/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
index 0d4809b..f052cce 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest2.java
@@ -30,6 +30,7 @@ import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
@@ -100,6 +101,8 @@ public class IgniteCacheCreatePutMultiNodeSelfTest2 extends GridCommonAbstractTe
 
                             Ignite ignite = startGrid(node);
 
+                            U.sleep();
+
                             IgniteCache cache = ignite.getOrCreateCache("cache1");
 
                             for (int i = 0; i < 100; i++)


Mime
View raw message