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-5075
Date Thu, 18 May 2017 09:05:43 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5075 e22b2d2f5 -> 19cc1cb18


ignite-5075


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

Branch: refs/heads/ignite-5075
Commit: 19cc1cb1876d87671aeb5ab4884c03ee4877a0ce
Parents: e22b2d2
Author: sboikov <sboikov@gridgain.com>
Authored: Thu May 18 12:05:34 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu May 18 12:05:34 2017 +0300

----------------------------------------------------------------------
 .../cache/CacheGroupInfrastructure.java         |  8 ++++---
 .../cache/IgniteCacheNoClassQuerySelfTest.java  | 23 +++-----------------
 2 files changed, 8 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/19cc1cb1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
index d176822..b744e2c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupInfrastructure.java
@@ -242,11 +242,13 @@ public class CacheGroupInfrastructure {
      */
     private void removeCacheContext(GridCacheContext cctx) {
         synchronized (caches) {
-            assert sharedGroup() || caches.size() == 1 : caches.size();
+            if (caches.contains(cctx)) { // It is possible cache is not added in case of
errors on cache start.
+                assert sharedGroup() || caches.size() == 1 : caches.size();
 
-            boolean rmv = caches.remove(cctx);
+                boolean rmv = caches.remove(cctx);
 
-            assert rmv : cctx.name();
+                assert rmv : cctx.name();
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/19cc1cb1/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java
index 4fa73b5..d50cb4c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java
@@ -20,13 +20,10 @@ package org.apache.ignite.internal.processors.cache;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedHashMap;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
@@ -44,23 +41,6 @@ public class IgniteCacheNoClassQuerySelfTest extends GridCommonAbstractTest
{
     /** */
     private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
 
-    /** */
-    protected Ignite ignite;
-
-    /**
-     * @return Atomicity mode.
-     */
-    protected CacheAtomicityMode atomicityMode() {
-        return TRANSACTIONAL;
-    }
-
-    /**
-     * @return Distribution.
-     */
-    protected NearCacheConfiguration nearCacheConfiguration() {
-        return new NearCacheConfiguration();
-    }
-
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws
Exception {
@@ -118,5 +98,8 @@ public class IgniteCacheNoClassQuerySelfTest extends GridCommonAbstractTest
{
         catch (Exception e) {
             assertTrue(e.getMessage().contains("default marshaller"));
         }
+        finally {
+            stopAllGrids();
+        }
     }
 }


Mime
View raw message