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 11:00:39 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1534 50fe35146 -> 93d0f5861


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/93d0f586
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/93d0f586
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/93d0f586

Branch: refs/heads/ignite-1534
Commit: 93d0f5861db8ac9593107538ec2d7502e2dc7c03
Parents: 50fe351
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Sep 30 14:00:30 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Sep 30 14:00:30 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheProcessor.java       | 17 +++++++++--------
 .../apache/ignite/internal/util/IgniteUtils.java   |  2 +-
 .../cache/distributed/CacheAffinityEarlyTest.java  |  4 ++--
 3 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/93d0f586/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index c86dfd9..ab29a30 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -2444,10 +2444,16 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                     }
                 }
                 else {
-                    if (req.clientStartOnly()) {
-                        assert req.initiatingNodeId() != null : req;
+                    assert req.initiatingNodeId() != null : req;
+
+                    // Cache already exists, exchange is needed only if client cache should
be created.
+                    ClusterNode node = ctx.discovery().node(req.initiatingNodeId());
+
+                    boolean clientReq = node != null &&
+                        !ctx.discovery().cacheAffinityNode(node, req.cacheName());
 
-                        needExchange = ctx.discovery().addClientNode(req.cacheName(),
+                    if (req.clientStartOnly()) {
+                        needExchange = clientReq && ctx.discovery().addClientNode(req.cacheName(),
                             req.initiatingNodeId(),
                             req.nearCacheConfiguration() != null);
                     }
@@ -2459,11 +2465,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                         }
                         else {
                             // Cache already exists, exchange is needed only if client cache
should be created.
-                            ClusterNode node = ctx.discovery().node(req.initiatingNodeId());
-
-                            boolean clientReq = node != null &&
-                                !ctx.discovery().cacheAffinityNode(node, req.cacheName());
-
                             needExchange = clientReq && ctx.discovery().addClientNode(req.cacheName(),
                                 req.initiatingNodeId(),
                                 req.nearCacheConfiguration() != null);

http://git-wip-us.apache.org/repos/asf/ignite/blob/93d0f586/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 597e0e9..c2489be 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
@@ -9306,7 +9306,7 @@ public abstract class IgniteUtils {
 
     public static void sleep() {
         try {
-            Thread.sleep(ThreadLocalRandom.current().nextLong(300) + 100);
+            Thread.sleep(ThreadLocalRandom.current().nextLong(100) + 50);
         }
         catch (InterruptedException e) {
             Thread.currentThread().interrupt();

http://git-wip-us.apache.org/repos/asf/ignite/blob/93d0f586/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
index f1e976a..932488e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java
@@ -46,7 +46,7 @@ public class CacheAffinityEarlyTest extends GridCommonAbstractTest {
     private volatile boolean stopped;
 
     /** Iteration. */
-    private static final int iters = 10;
+    private static final int iters = 5;
 
     /** Concurrent. */
     private static final boolean concurrent = true;
@@ -76,7 +76,7 @@ public class CacheAffinityEarlyTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected long getTestTimeout() {
-        return 6 * 60 * 1000L;
+        return 10 * 60 * 1000L;
     }
 
     /**


Mime
View raw message