ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [04/50] ignite git commit: ignite-gg-12301 fix Activate/Deactivate test fail
Date Tue, 20 Jun 2017 06:00:06 GMT
ignite-gg-12301 fix Activate/Deactivate test fail


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

Branch: refs/heads/ignite-2.1.2-exchange
Commit: 57bfba76e2e1f914f4a00c9deb9a57a14ad2a6e4
Parents: d52aa80
Author: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
Authored: Fri Jun 16 17:16:16 2017 +0300
Committer: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
Committed: Fri Jun 16 17:16:16 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheProcessor.java    |  16 ++-
 .../GridCacheDatabaseSharedManager.java         | 140 ++++++++-----------
 .../IgniteCacheDatabaseSharedManager.java       |  13 +-
 .../persistence/pagemem/PageMemoryImpl.java     |   6 +-
 .../cluster/GridClusterStateProcessor.java      |   3 +-
 .../service/GridServiceProcessor.java           |  11 +-
 .../IgniteChangeGlobalStateAbstractTest.java    |   7 +-
 .../IgniteChangeGlobalStateCacheTest.java       |   5 -
 ...IgniteChangeGlobalStateDataStreamerTest.java |   2 +-
 .../IgniteChangeGlobalStateFailOverTest.java    |   2 +
 .../IgniteChangeGlobalStateTest.java            |   2 +-
 .../IgniteStandByClusterTest.java               |  23 +++
 .../extended/GridActivateExtensionTest.java     |   4 +-
 ...ctiveNodeToActiveClusterWithPersistence.java |   8 ++
 .../testsuites/IgniteStandByClusterSuite.java   |   3 +-
 15 files changed, 137 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/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 7130e0f..d65aa24 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
@@ -1268,8 +1268,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         ctx.kernalContext().continuous().onCacheStop(ctx);
 
-        ctx.kernalContext().cache().context().database().onCacheStop(ctx);
-
         ctx.kernalContext().cache().context().snapshot().onCacheStop(ctx);
 
         ctx.group().stopCache(ctx, destroy);
@@ -2113,10 +2111,23 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (exchActions != null && err == null) {
             Collection<IgniteBiTuple<CacheGroupContext, Boolean>> stoppedGrps
= null;
 
+            boolean forceCheckpoint = false;
+
             for (ExchangeActions.ActionData action : exchActions.cacheStopRequests()) {
                 GridCacheContext<?, ?> stopCtx;
                 boolean destroy;
 
+                if (!forceCheckpoint){
+                    try {
+                        sharedCtx.database().waitForCheckpoint("caches stop");
+                    }
+                    catch (IgniteCheckedException e) {
+                        U.error(log, "Failed to wait for checkpoint finish during cache stop.",
e);
+                    }
+
+                    forceCheckpoint = true;
+                }
+
                 stopGateway(action.request());
 
                 sharedCtx.database().checkpointReadLock();
@@ -2783,7 +2794,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         return fut;
     }
 
-
     public CacheType cacheType(String cacheName ) {
         if (CU.isUtilityCache(cacheName))
             return CacheType.UTILITY;

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 4ce61e2..0e3aced 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -103,7 +103,6 @@ import org.apache.ignite.internal.processors.cache.CacheGroupContext;
 import org.apache.ignite.internal.processors.cache.ClusterState;
 import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.StoredCacheData;
 import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager;
@@ -219,6 +218,12 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
         }
     };
 
+    /** */
+    private static final String MBEAN_NAME = "PersistenceMetrics";
+
+    /** */
+    private static final String MBEAN_GROUP = "Persistent Store";
+
     /** Checkpoint thread. Needs to be volatile because it is created in exchange worker.
*/
     private volatile Checkpointer checkpointer;
 
@@ -366,18 +371,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
             persStoreMetrics.wal(cctx.wal());
 
-            try {
-                persistenceMetricsMbeanName = U.registerMBean(
-                    cctx.kernalContext().config().getMBeanServer(),
-                    cctx.kernalContext().igniteInstanceName(),
-                    "Persistent Store",
-                    "PersistenceMetrics",
-                    persStoreMetrics,
-                    PersistenceMetricsMXBean.class);
-            }
-            catch (JMException e) {
-                throw new IgniteCheckedException("Failed to register persistence metrics
MBean", e);
-            }
+            registrateMetricsMBean();
         }
     }
 
@@ -453,8 +447,13 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
         initDataBase();
 
-        GridCacheProcessor cachePrc = cctx.kernalContext().cache();
+        initCachesAndRestoreMemory();
+    }
 
+    /**
+     *
+     */
+    private void initCachesAndRestoreMemory() throws IgniteCheckedException {
         Collection<String> cacheNames = new HashSet<>();
 
         // TODO IGNITE-5075 group descriptors.
@@ -485,77 +484,83 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
         for (StoredCacheData cacheData : cctx.pageStore().readCacheConfigurations().values())
{
             if (!cacheNames.contains(cacheData.config().getName()))
                 storeMgr.initializeForCache(
-                    cctx.cache().cacheDescriptors().get(cacheData.config().getName()).groupDescriptor(),
cacheData);
+                    cctx.cache().cacheDescriptors().get(
+                        cacheData.config().getName()).groupDescriptor(), cacheData);
         }
 
         readCheckpointAndRestoreMemory();
     }
 
-
     /** {@inheritDoc} */
     @Override public void onActivate(GridKernalContext kctx) throws IgniteCheckedException
{
-        snapshotMgr = cctx.snapshot();
-
-        if (cctx.localNode().isClient())
-            return;
-
-        initDataBase();
-
         if (log.isDebugEnabled())
             log.debug("Activate database manager [id=" + cctx.localNodeId() +
                 " topVer=" + cctx.discovery().topologyVersionEx() + " ]");
 
-        GridCacheProcessor cachePrc = cctx.kernalContext().cache();
-
-
-        Collection<String> cacheNames = new HashSet<>();
-
-        // TODO IGNITE-5075 group descriptors.
-        for (CacheConfiguration ccfg : cctx.kernalContext().config().getCacheConfiguration())
{
-            if (CU.isSystemCache(ccfg.getName())) {
-                storeMgr.initializeForCache(
-                    cctx.cache().cacheDescriptors().get(ccfg.getName()).groupDescriptor(),
new StoredCacheData(ccfg));
-
-                cacheNames.add(ccfg.getName());
-            }
-        }
-
-        for (CacheConfiguration ccfg : cctx.kernalContext().config().getCacheConfiguration())
-            if (!CU.isSystemCache(ccfg.getName())) {
-                DynamicCacheDescriptor cacheDesc = cctx.cache().cacheDescriptors().get(ccfg.getName());
+        snapshotMgr = cctx.snapshot();
 
-                if (cacheDesc != null)
-                    storeMgr.initializeForCache(cacheDesc.groupDescriptor(), new StoredCacheData(ccfg));
+        if (!cctx.localNode().isClient()) {
+            initDataBase();
 
-                cacheNames.add(ccfg.getName());
-            }
+            registrateMetricsMBean();
 
-        for (StoredCacheData cacheData : cctx.pageStore().readCacheConfigurations().values())
{
-            if (!cacheNames.contains(cacheData.config().getName()))
-                storeMgr.initializeForCache(
-                    cctx.cache().cacheDescriptors().get(cacheData.config().getName()).groupDescriptor(),
cacheData);
+            initCachesAndRestoreMemory();
         }
 
-        readCheckpointAndRestoreMemory();
-
         if (log.isDebugEnabled())
             log.debug("Restore state after activation [nodeId=" + cctx.localNodeId() + "
]");
     }
 
     /** {@inheritDoc} */
     @Override public void onDeActivate(GridKernalContext kctx) throws IgniteCheckedException
{
-        stop0(false);
-
         if (log.isDebugEnabled())
             log.debug("DeActivate database manager [id=" + cctx.localNodeId() +
                 " topVer=" + cctx.discovery().topologyVersionEx() + " ]");
 
         onKernalStop0(false);
 
+        stop0(false);
+
         /* Must be here, because after deactivate we can invoke activate and file lock must
be already configured */
         stopping = false;
 
-        fileLockHolder = new FileLockHolder(storeMgr.workDir().getPath(), cctx.kernalContext(),
log);
+        if (!cctx.localNode().isClient())
+            fileLockHolder = new FileLockHolder(storeMgr.workDir().getPath(), cctx.kernalContext(),
log);
+    }
+
+    /**
+     *
+     */
+    private void registrateMetricsMBean() throws IgniteCheckedException {
+        try {
+            persistenceMetricsMbeanName = U.registerMBean(
+                cctx.kernalContext().config().getMBeanServer(),
+                cctx.kernalContext().igniteInstanceName(),
+                MBEAN_GROUP,
+                MBEAN_NAME,
+                persStoreMetrics,
+                PersistenceMetricsMXBean.class);
+        }
+        catch (JMException e) {
+            throw new IgniteCheckedException("Failed to register " + MBEAN_NAME + " MBean.",
e);
+        }
+    }
+
+    /**
+     *
+     */
+    private void unRegistrateMetricsMBean() {
+        if (persistenceMetricsMbeanName != null) {
+            try {
+                cctx.kernalContext().config().getMBeanServer().unregisterMBean(persistenceMetricsMbeanName);
+            }
+            catch (InstanceNotFoundException ignore) {
+                // No-op, nothing to unregister.
+            }
+            catch (MBeanRegistrationException e) {
+                U.error(log, "Failed to unregister " + MBEAN_NAME + " MBean.", e);
+            }
+        }
     }
 
     /**
@@ -602,11 +607,6 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
     }
 
     /** {@inheritDoc} */
-    @Override public void onCacheStop(GridCacheContext cctx) {
-        snapshotMgr.onCacheStop(cctx);
-    }
-
-    /** {@inheritDoc} */
     @Override protected void onKernalStop0(boolean cancel) {
         checkpointLock.writeLock().lock();
 
@@ -629,17 +629,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
             fileLockHolder.close();
         }
 
-        if (persistenceMetricsMbeanName != null) {
-            try {
-                cctx.kernalContext().config().getMBeanServer().unregisterMBean(persistenceMetricsMbeanName);
-            }
-            catch (InstanceNotFoundException ignore) {
-                // No-op, nothing to unregister.
-            }
-            catch (MBeanRegistrationException e) {
-                U.error(log, "Failed to unregister persistence metrics MBean (will continue
stop routine)", e);
-            }
-        }
+        unRegistrateMetricsMBean();
     }
 
     /** */
@@ -823,14 +813,8 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
 
     /** {@inheritDoc} */
     @Override public void onCacheGroupsStopped(
-        Collection<IgniteBiTuple<CacheGroupContext, Boolean>> stoppedGrps) {
-        try {
-            waitForCheckpoint("caches stop");
-        }
-        catch (IgniteCheckedException e) {
-            U.error(log, "Failed to wait for checkpoint finish during cache stop.", e);
-        }
-
+        Collection<IgniteBiTuple<CacheGroupContext, Boolean>> stoppedGrps
+    ) {
         Map<PageMemoryEx, Collection<Integer>> destroyed = new HashMap<>();
 
         for (IgniteBiTuple<CacheGroupContext, Boolean> tup : stoppedGrps) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
index 2aba23d..456e7b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
@@ -118,7 +118,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
         initPageMemoryPolicies(memCfg);
 
-        //registerMetricsMBeans();
+        registerMetricsMBeans();
 
         startMemoryPolicies();
 
@@ -662,7 +662,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
                 IgniteConfiguration cfg = cctx.gridConfig();
 
-              /*  try {
+                try {
                     cfg.getMBeanServer().unregisterMBean(
                         U.makeMBeanName(
                             cfg.getIgniteInstanceName(),
@@ -672,7 +672,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
                 catch (JMException e) {
                     U.error(log, "Failed to unregister MBean for memory metrics: " +
                         memPlc.memoryMetrics().getName(), e);
-                }*/
+                }
             }
         }
     }
@@ -755,13 +755,6 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     }
 
     /**
-     * @param cctx Stopped cache context.
-     */
-    public void onCacheStop(GridCacheContext cctx) {
-        // No-op
-    }
-
-    /**
      * @return Future that will be completed when indexes for given cache are restored.
      */
     @Nullable public IgniteInternalFuture indexRebuildFuture(int cacheId) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
index 423d572..fb9bd3e 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
@@ -28,7 +28,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.ThreadPoolExecutor;
@@ -179,7 +179,7 @@ public class PageMemoryImpl implements PageMemoryEx {
     private final CheckpointLockStateChecker stateChecker;
 
     /** */
-    private Executor asyncRunner = new ThreadPoolExecutor(
+    private ExecutorService asyncRunner = new ThreadPoolExecutor(
         0,
         Runtime.getRuntime().availableProcessors(),
         30L,
@@ -324,6 +324,8 @@ public class PageMemoryImpl implements PageMemoryEx {
         if (log.isDebugEnabled())
             log.debug("Stopping page memory.");
 
+        U.shutdownNow(getClass(), asyncRunner, log);
+
         directMemoryProvider.shutdown();
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
index b4d329d..00c9799 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
@@ -248,7 +248,8 @@ public class GridClusterStateProcessor extends GridProcessorAdapter {
         // First node started (coordinator).
         if (nodes.isEmpty() || nodes.get(0).isLocal())
             cacheData.putAll(localCacheData.caches());
-        else if (globalState == INACTIVE) { // Accept inactivate state after join.
+
+        if (globalState == INACTIVE) { // Accept inactivate state after join.
             if (log != null && log.isInfoEnabled())
                 log.info("Got inactivate state from cluster during node join.");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index e2cf53b..12be63b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -215,6 +215,15 @@ public class GridServiceProcessor extends GridProcessorAdapter implements
Ignite
         if (ctx.isDaemon() || !ctx.state().active())
             return;
 
+        onKernalStart0();
+    }
+
+    /**
+     * Do kernal start.
+     *
+     * @throws IgniteCheckedException If failed.
+     */
+    private void onKernalStart0() throws IgniteCheckedException {
         cache = ctx.cache().utilityCache();
 
         if (!ctx.clientNode())
@@ -350,7 +359,7 @@ public class GridServiceProcessor extends GridProcessorAdapter implements
Ignite
 
         start();
 
-        onKernalStart();
+        onKernalStart0();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
index 4ccc8ed..a06e0ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateAbstractTest.java
@@ -153,7 +153,8 @@ public abstract class IgniteChangeGlobalStateAbstractTest extends GridCommonAbst
         for (int i = 0; i < cnt; i++)
             startPrimary(i);
 
-        grid("node0" + primarySuffix).active(true);
+        if (cnt > 0)
+            grid("node0" + primarySuffix).active(true);
     }
 
     /**
@@ -343,8 +344,8 @@ public abstract class IgniteChangeGlobalStateAbstractTest extends GridCommonAbst
         memCfg.setConcurrencyLevel(64);
 
         MemoryPolicyConfiguration memPlcCfg = new MemoryPolicyConfiguration();
-        memPlcCfg.setInitialSize(20 * 1024 * 1024);
-        memPlcCfg.setMaxSize(20 * 1024 * 1024);
+        memPlcCfg.setInitialSize(200 * 1024 * 1024);
+        memPlcCfg.setMaxSize(200 * 1024 * 1024);
         memPlcCfg.setName("dfltMemPlc");
 
         memCfg.setMemoryPolicies(memPlcCfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java
index 1dc99f9..2f2385d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateCacheTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.persistence.standbycluster;
 
-import javax.cache.configuration.Configuration;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -127,8 +126,6 @@ public class IgniteChangeGlobalStateCacheTest extends IgniteChangeGlobalStateAbs
 
         IgniteCache<String, String> cacheExp = ig1.getOrCreateCache(chName);
 
-        Configuration<String, String> cfgExp = cacheExp.getConfiguration(CacheConfiguration.class);
-
         cacheExp.put("key", "value");
 
         assertTrue(ig1.active());
@@ -161,8 +158,6 @@ public class IgniteChangeGlobalStateCacheTest extends IgniteChangeGlobalStateAbs
 
         IgniteCache<String, String> cacheAct = ig2.cache(chName);
 
-        Configuration<String, String> cfgAct = cacheAct.getConfiguration(CacheConfiguration.class);
-
         assertEquals("value", cacheAct.get("key"));
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
index f13ef97..d3e8298 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateDataStreamerTest.java
@@ -83,7 +83,7 @@ public class IgniteChangeGlobalStateDataStreamerTest extends IgniteChangeGlobalS
         catch (Exception e) {
             fail = true;
 
-            assertTrue(e.getMessage().contains("can not perform operation, because cluster
inactive"));
+            assertTrue(e.getMessage().contains("Can not perform the operation because the
cluster is inactive."));
         }
 
         if (!fail)

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
index bb05048..d0b2d56 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateFailOverTest.java
@@ -143,6 +143,8 @@ public class IgniteChangeGlobalStateFailOverTest extends IgniteChangeGlobalState
      *
      */
     public void testActivateDeActivateOnJoiningNode() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-5520");
+
         final Ignite igB1 = backUp(0);
         final Ignite igB2 = backUp(1);
         final Ignite igB3 = backUp(2);

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
index bd5044b..667a7ac 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteChangeGlobalStateTest.java
@@ -412,7 +412,7 @@ public class IgniteChangeGlobalStateTest extends IgniteChangeGlobalStateAbstract
                 IgniteCache cache = ig.cache("cache");
                 return null;
             }
-        }, IgniteException.class, "can not perform operation, because cluster inactive");
+        }, IgniteException.class, "Can not perform the operation because the cluster is inactive.");
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
index 7a914f3..647511e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/IgniteStandByClusterTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.persistence.standbycluster;
 
 import java.util.Arrays;
 import java.util.Map;
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -186,6 +187,28 @@ public class IgniteStandByClusterTest extends GridCommonAbstractTest
{
         Assert.assertNotNull(caches3.get(cache3));
     }
 
+    public void testSimple() throws Exception {
+        IgniteEx ig = startGrid(0);
+
+        ig.active(true);
+
+        IgniteCache<Integer, String> cache0 = ig.getOrCreateCache("cache");
+
+        cache0.put(1, "1");
+
+        assertEquals("1", cache0.get(1));
+
+        ig.active(false);
+
+        assertTrue(!ig.active());
+
+        ig.active(true);
+
+        IgniteCache<Integer, String> cache = ig.cache("cache");
+
+        assertEquals("1", cache.get(1));
+    }
+
     private static class NodeFilterIgnoreByName implements IgnitePredicate<ClusterNode>{
         private final String name;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/extended/GridActivateExtensionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/extended/GridActivateExtensionTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/extended/GridActivateExtensionTest.java
index 4f4d838..f70dd1e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/extended/GridActivateExtensionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/extended/GridActivateExtensionTest.java
@@ -73,8 +73,8 @@ public class GridActivateExtensionTest extends GridCacheAbstractFullApiSelfTest
 
         MemoryPolicyConfiguration memPlcCfg = new MemoryPolicyConfiguration();
 
-        memPlcCfg.setInitialSize(5 * 1024 * 1024);
-        memPlcCfg.setMaxSize(5 * 1024 * 1024);
+        memPlcCfg.setInitialSize(200 * 1024 * 1024);
+        memPlcCfg.setMaxSize(200 * 1024 * 1024);
 
         memPlcCfg.setName("dfltMemPlc");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
index 54087ba..60388fa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/persistence/JoinActiveNodeToActiveClusterWithPersistence.java
@@ -68,6 +68,14 @@ public class JoinActiveNodeToActiveClusterWithPersistence extends JoinActiveNode
         joinClientWithOutConfigurationTemplate().execute();
     }
 
+    @Override public void testJoinClientStaticCacheConfigurationDifferentOnBoth() throws
Exception {
+        staticCacheConfigurationDifferentOnBothTemplate().execute();
+    }
+
+    @Override public void testJoinClientStaticCacheConfigurationInCluster() throws Exception
{
+        staticCacheConfigurationInClusterTemplate().execute();
+    }
+
     @Override public AbstractNodeJoinTemplate.JoinNodeTestPlanBuilder staticCacheConfigurationOnJoinTemplate()
throws Exception {
         return persistent(super.staticCacheConfigurationOnJoinTemplate());
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/57bfba76/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java
index 6418eef..6fa158d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteStandByClusterSuite.java
@@ -22,6 +22,7 @@ import org.apache.ignite.internal.processors.cache.persistence.standbycluster.Ig
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.IgniteChangeGlobalStateDataStreamerTest;
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.IgniteChangeGlobalStateDataStructureTest;
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.IgniteChangeGlobalStateFailOverTest;
+import org.apache.ignite.internal.processors.cache.persistence.standbycluster.IgniteChangeGlobalStateServiceTest;
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.IgniteChangeGlobalStateTest;
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.IgniteStandByClusterTest;
 import org.apache.ignite.internal.processors.cache.persistence.standbycluster.join.JoinActiveNodeToActiveCluster;
@@ -64,7 +65,7 @@ public class IgniteStandByClusterSuite extends TestSuite {
         suite.addTestSuite(IgniteChangeGlobalStateDataStructureTest.class);
         suite.addTestSuite(IgniteChangeGlobalStateDataStreamerTest.class);
         suite.addTestSuite(IgniteChangeGlobalStateFailOverTest.class);
-//        suite.addTestSuite(IgniteChangeGlobalStateServiceTest.class);
+        suite.addTestSuite(IgniteChangeGlobalStateServiceTest.class);
 
         return suite;
     }


Mime
View raw message