ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [1/4] ignite git commit: ignite-db-x fix rebalance test, testOldestChanged, close port if happen exception during start processors
Date Tue, 21 Feb 2017 16:29:51 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477 7721df275 -> 84df8b32d


ignite-db-x fix rebalance test,  testOldestChanged,  close port if happen exception during
start processors


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

Branch: refs/heads/ignite-3477
Commit: 1cef4d341cfdd8cfc5f5efffcc3a3cc04ed69e07
Parents: c5aee5b
Author: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Authored: Tue Feb 21 17:38:28 2017 +0300
Committer: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Committed: Tue Feb 21 17:38:28 2017 +0300

----------------------------------------------------------------------
 .../managers/discovery/GridDiscoveryManager.java         | 11 +++++++++++
 .../discovery/tcp/internal/TcpDiscoveryNodesRing.java    |  3 ++-
 .../IgniteDynamicCacheStartNoExchangeTimeoutTest.java    |  8 +++++---
 .../junits/common/GridCommonAbstractTest.java            |  2 +-
 4 files changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1cef4d34/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 218aff0..7129896 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
@@ -271,6 +271,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
     /** */
     private Object consistentId;
 
+    /** Discovery spi registered flag. */
+    private boolean registeredDiscoSpi;
+
     /** @param ctx Context. */
     public GridDiscoveryManager(GridKernalContext ctx) {
         super(ctx, ctx.config().getDiscoverySpi());
@@ -702,6 +705,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
 
         startSpi();
 
+        registeredDiscoSpi = true;
+
         try {
             U.await(startLatch);
         }
@@ -1394,6 +1399,12 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
         // Stop SPI itself.
         stopSpi();
 
+        // Stop spi if was not add in spi map but port was open.
+        if (!registeredDiscoSpi)
+            getSpi().spiStop();
+
+        registeredDiscoSpi = false;
+
         if (log.isDebugEnabled())
             log.debug(stopInfo());
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cef4d34/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
index eb0f74a..54ddc9e 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNodesRing.java
@@ -397,7 +397,8 @@ public class TcpDiscoveryNodesRing {
 
             topVer = 0;
 
-            minNodeVer = locNode.version();
+            if (locNode != null)
+                minNodeVer = locNode.version();
         }
         finally {
             rwLock.writeLock().unlock();

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cef4d34/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
index 263e9ca..cc2b3d7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
@@ -249,7 +249,7 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
 
         ccfg.setNodeFilter(new TestFilterExcludeOldest());
 
-        assertNotNull(ignite0.getOrCreateCache(ccfg));
+        assertNotNull(ignite(1).getOrCreateCache(ccfg));
 
         stopGrid(0);
 
@@ -276,7 +276,7 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
 
         ccfg.setNodeFilter(new TestFilterIncludeNode(3));
 
-        assertNotNull(ignite0.getOrCreateCache(ccfg));
+        assertNotNull(ignite(1).getOrCreateCache(ccfg));
 
         stopGrid(0);
 
@@ -295,11 +295,13 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
     public void testOldestChanged3() throws Exception {
         IgniteEx ignite0 = grid(0);
 
+        assertEquals(1L, ignite0.localNode().order());
+
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setNodeFilter(new TestFilterIncludeNode(3));
 
-        assertNotNull(ignite0.getOrCreateCache(ccfg));
+        assertNotNull(ignite(1).getOrCreateCache(ccfg));
 
         stopGrid(0);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1cef4d34/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index d82f1ea..480928c 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -565,7 +565,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest
{
                 if (cfg == null)
                     continue;
 
-                if (cfg.getCacheMode() == PARTITIONED &&
+                if (cfg.getCacheMode() != LOCAL &&
                     cfg.getRebalanceMode() != NONE &&
                     g.cluster().nodes().size() > 1) {
                     AffinityFunction aff = cfg.getAffinity();


Mime
View raw message