ignite-1.5 debug
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a24168dc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a24168dc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a24168dc Branch: refs/heads/ignite-1537 Commit: a24168dc96008c722e6faf1436c8520d793a9be9 Parents: 36bf0e0 Author: sboikov <sboi...@gridgain.com> Authored: Mon Dec 28 15:33:16 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Mon Dec 28 16:02:29 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/internal/IgniteKernal.java | 89 +++++++++++++++----- .../processors/cache/GridCacheProcessor.java | 52 ++++++++---- .../processors/cache/IgniteCacheProxy.java | 2 +- .../datastructures/DataStructuresProcessor.java | 11 ++- .../handlers/cache/GridCacheCommandHandler.java | 4 +- .../cache/IgniteDynamicCacheStartSelfTest.java | 25 +++--- .../internal/util/nio/GridNioSelfTest.java | 11 ++- .../IgniteCacheFailoverTestSuite3.java | 7 +- 8 files changed, 139 insertions(+), 62 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java index 14b5816..750c883 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java @@ -1424,8 +1424,11 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { } /** @throws IgniteCheckedException If registration failed. */ - private void registerExecutorMBeans(ExecutorService execSvc, ExecutorService sysExecSvc, ExecutorService p2pExecSvc, - ExecutorService mgmtExecSvc, ExecutorService restExecSvc) throws IgniteCheckedException { + private void registerExecutorMBeans(ExecutorService execSvc, + ExecutorService sysExecSvc, + ExecutorService p2pExecSvc, + ExecutorService mgmtExecSvc, + ExecutorService restExecSvc) throws IgniteCheckedException { pubExecSvcMBean = registerExecutorMBean(execSvc, "GridExecutionExecutor"); sysExecSvcMBean = registerExecutorMBean(sysExecSvc, "GridSystemExecutor"); mgmtExecSvcMBean = registerExecutorMBean(mgmtExecSvc, "GridManagementExecutor"); @@ -2414,7 +2417,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { guard(); try { - return ctx.cache().publicJCache(name, false); + return ctx.cache().publicJCache(name, false, true); } catch (IgniteCheckedException e) { throw CU.convertToCacheException(e); @@ -2431,7 +2434,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { guard(); try { - ctx.cache().dynamicStartCache(cacheCfg, cacheCfg.getName(), null, true, true).get(); + ctx.cache().dynamicStartCache(cacheCfg, cacheCfg.getName(), null, true, true, true).get(); return ctx.cache().publicJCache(cacheCfg.getName()); } @@ -2467,8 +2470,14 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { guard(); try { - if (ctx.cache().cache(cacheCfg.getName()) == null) - ctx.cache().dynamicStartCache(cacheCfg, cacheCfg.getName(), null, false, true).get(); + if (ctx.cache().cache(cacheCfg.getName()) == null) { + ctx.cache().dynamicStartCache(cacheCfg, + cacheCfg.getName(), + null, + false, + true, + true).get(); + } return ctx.cache().publicJCache(cacheCfg.getName()); } @@ -2491,7 +2500,12 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { guard(); try { - ctx.cache().dynamicStartCache(cacheCfg, cacheCfg.getName(), nearCfg, true, true).get(); + ctx.cache().dynamicStartCache(cacheCfg, + cacheCfg.getName(), + nearCfg, + true, + true, + true).get(); return ctx.cache().publicJCache(cacheCfg.getName()); } @@ -2514,11 +2528,23 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { try { IgniteInternalCache<Object, Object> cache = ctx.cache().cache(cacheCfg.getName()); - if (cache == null) - ctx.cache().dynamicStartCache(cacheCfg, cacheCfg.getName(), nearCfg, false, true).get(); + if (cache == null) { + ctx.cache().dynamicStartCache(cacheCfg, + cacheCfg.getName(), + nearCfg, + false, + true, + true).get(); + } else { - if (cache.configuration().getNearConfiguration() == null) - ctx.cache().dynamicStartCache(cacheCfg, cacheCfg.getName(), nearCfg, false, true).get(); + if (cache.configuration().getNearConfiguration() == null) { + ctx.cache().dynamicStartCache(cacheCfg, + cacheCfg.getName(), + nearCfg, + false, + true, + true).get(); + } } return ctx.cache().publicJCache(cacheCfg.getName()); @@ -2538,7 +2564,12 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { guard(); try { - ctx.cache().dynamicStartCache(null, cacheName, nearCfg, true, true).get(); + ctx.cache().dynamicStartCache(null, + cacheName, + nearCfg, + true, + true, + true).get(); IgniteCacheProxy<K, V> cache = ctx.cache().publicJCache(cacheName); @@ -2564,11 +2595,23 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { try { IgniteInternalCache<Object, Object> internalCache = ctx.cache().cache(cacheName); - if (internalCache == null) - ctx.cache().dynamicStartCache(null, cacheName, nearCfg, false, true).get(); + if (internalCache == null) { + ctx.cache().dynamicStartCache(null, + cacheName, + nearCfg, + false, + true, + true).get(); + } else { - if (internalCache.configuration().getNearConfiguration() == null) - ctx.cache().dynamicStartCache(null, cacheName, nearCfg, false, true).get(); + if (internalCache.configuration().getNearConfiguration() == null) { + ctx.cache().dynamicStartCache(null, + cacheName, + nearCfg, + false, + true, + true).get(); + } } IgniteCacheProxy<K, V> cache = ctx.cache().publicJCache(cacheName); @@ -2596,7 +2639,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { /** {@inheritDoc} */ @Override public void destroyCache(String cacheName) { - IgniteInternalFuture stopFut = destroyCacheAsync(cacheName); + IgniteInternalFuture stopFut = destroyCacheAsync(cacheName, true); try { stopFut.get(); @@ -2608,13 +2651,14 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { /** * @param cacheName Cache name. + * @param checkThreadTx If {@code true} checks that current thread does not have active transactions. * @return Ignite future. */ - public IgniteInternalFuture<?> destroyCacheAsync(String cacheName) { + public IgniteInternalFuture<?> destroyCacheAsync(String cacheName, boolean checkThreadTx) { guard(); try { - return ctx.cache().dynamicDestroyCache(cacheName); + return ctx.cache().dynamicDestroyCache(cacheName, checkThreadTx); } finally { unguard(); @@ -2627,7 +2671,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { try { if (ctx.cache().cache(cacheName) == null) - ctx.cache().getOrCreateFromTemplate(cacheName).get(); + ctx.cache().getOrCreateFromTemplate(cacheName, true).get(); return ctx.cache().publicJCache(cacheName); } @@ -2641,14 +2685,15 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { /** * @param cacheName Cache name. + * @param checkThreadTx If {@code true} checks that current thread does not have active transactions. * @return Future that will be completed when cache is deployed. */ - public IgniteInternalFuture<?> getOrCreateCacheAsync(String cacheName) { + public IgniteInternalFuture<?> getOrCreateCacheAsync(String cacheName, boolean checkThreadTx) { guard(); try { if (ctx.cache().cache(cacheName) == null) - return ctx.cache().getOrCreateFromTemplate(cacheName); + return ctx.cache().getOrCreateFromTemplate(cacheName, checkThreadTx); return new GridFinishedFuture<>(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/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 ff02e70..eb6d98e 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 @@ -2030,7 +2030,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { try { CacheConfiguration cfg = createConfigFromTemplate(cacheName); - return dynamicStartCache(cfg, cacheName, null, true, true); + return dynamicStartCache(cfg, cacheName, null, true, true, true); } catch (IgniteCheckedException e) { throw U.convertException(e); @@ -2041,16 +2041,17 @@ public class GridCacheProcessor extends GridProcessorAdapter { * Dynamically starts cache using template configuration. * * @param cacheName Cache name. + * @param checkThreadTx If {@code true} checks that current thread does not have active transactions. * @return Future that will be completed when cache is deployed. */ - public IgniteInternalFuture<?> getOrCreateFromTemplate(String cacheName) { + public IgniteInternalFuture<?> getOrCreateFromTemplate(String cacheName, boolean checkThreadTx) { try { - if (publicJCache(cacheName, false) != null) // Cache with given name already started. + if (publicJCache(cacheName, false, checkThreadTx) != null) // Cache with given name already started. return new GridFinishedFuture<>(); CacheConfiguration cfg = createConfigFromTemplate(cacheName); - return dynamicStartCache(cfg, cacheName, null, false, true); + return dynamicStartCache(cfg, cacheName, null, false, true, checkThreadTx); } catch (IgniteCheckedException e) { return new GridFinishedFuture<>(e); @@ -2060,6 +2061,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { /** * @param cacheName Cache name. * @return Cache configuration. + * @throws IgniteCheckedException If failed. */ private CacheConfiguration createConfigFromTemplate(String cacheName) throws IgniteCheckedException { CacheConfiguration cfgTemplate = null; @@ -2138,6 +2140,8 @@ public class GridCacheProcessor extends GridProcessorAdapter { * @param cacheName Cache name. * @param nearCfg Near cache configuration. * @param failIfExists Fail if exists flag. + * @param failIfNotStarted If {@code true} fails if cache is not started. + * @param checkThreadTx If {@code true} checks that current thread does not have active transactions. * @return Future that will be completed when cache is deployed. */ @SuppressWarnings("IfMayBeConditional") @@ -2146,9 +2150,16 @@ public class GridCacheProcessor extends GridProcessorAdapter { String cacheName, @Nullable NearCacheConfiguration nearCfg, boolean failIfExists, - boolean failIfNotStarted + boolean failIfNotStarted, + boolean checkThreadTx ) { - return dynamicStartCache(ccfg, cacheName, nearCfg, CacheType.USER, failIfExists, failIfNotStarted); + return dynamicStartCache(ccfg, + cacheName, + nearCfg, + CacheType.USER, + failIfExists, + failIfNotStarted, + checkThreadTx); } /** @@ -2157,7 +2168,10 @@ public class GridCacheProcessor extends GridProcessorAdapter { * @param ccfg Cache configuration. * @param cacheName Cache name. * @param nearCfg Near cache configuration. + * @param cacheType Cache type. * @param failIfExists Fail if exists flag. + * @param failIfNotStarted If {@code true} fails if cache is not started. + * @param checkThreadTx If {@code true} checks that current thread does not have active transactions. * @return Future that will be completed when cache is deployed. */ @SuppressWarnings("IfMayBeConditional") @@ -2167,9 +2181,11 @@ public class GridCacheProcessor extends GridProcessorAdapter { @Nullable NearCacheConfiguration nearCfg, CacheType cacheType, boolean failIfExists, - boolean failIfNotStarted + boolean failIfNotStarted, + boolean checkThreadTx ) { - checkEmptyTransactions(); + if (checkThreadTx) + checkEmptyTransactions(); DynamicCacheDescriptor desc = registeredCaches.get(maskNull(cacheName)); @@ -2260,10 +2276,12 @@ public class GridCacheProcessor extends GridProcessorAdapter { /** * @param cacheName Cache name to destroy. + * @param checkThreadTx If {@code true} checks that current thread does not have active transactions. * @return Future that will be completed when cache is destroyed. */ - public IgniteInternalFuture<?> dynamicDestroyCache(String cacheName) { - checkEmptyTransactions(); + public IgniteInternalFuture<?> dynamicDestroyCache(String cacheName, boolean checkThreadTx) { + if (checkThreadTx) + checkEmptyTransactions(); DynamicCacheChangeRequest t = new DynamicCacheChangeRequest(cacheName, ctx.localNodeId()); @@ -2898,7 +2916,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { IgniteCacheProxy<?, ?> cache = jCacheProxies.get(masked); if (cache == null) { - dynamicStartCache(null, name, null, false, true).get(); + dynamicStartCache(null, name, null, false, true, true).get(); cache = jCacheProxies.get(masked); } @@ -3001,21 +3019,21 @@ public class GridCacheProcessor extends GridProcessorAdapter { * @throws IgniteCheckedException If failed. */ public <K, V> IgniteCacheProxy<K, V> publicJCache(@Nullable String cacheName) throws IgniteCheckedException { - return publicJCache(cacheName, true); + return publicJCache(cacheName, true, true); } /** * @param cacheName Cache name. * @param failIfNotStarted If {@code true} throws {@link IllegalArgumentException} if cache is not started, * otherwise returns {@code null} in this case. - * @param <K> type of keys. - * @param <V> type of values. + * @param checkThreadTx If {@code true} checks that current thread does not have active transactions. * @return Cache instance for given name. * @throws IgniteCheckedException If failed. */ @SuppressWarnings({"unchecked", "ConstantConditions"}) - @Nullable public <K, V> IgniteCacheProxy<K, V> publicJCache(@Nullable String cacheName, boolean failIfNotStarted) - throws IgniteCheckedException + @Nullable public <K, V> IgniteCacheProxy<K, V> publicJCache(@Nullable String cacheName, + boolean failIfNotStarted, + boolean checkThreadTx) throws IgniteCheckedException { if (log.isDebugEnabled()) log.debug("Getting public cache for name: " + cacheName); @@ -3030,7 +3048,7 @@ public class GridCacheProcessor extends GridProcessorAdapter { throw new IllegalStateException("Failed to get cache because it is a system cache: " + cacheName); if (cache == null) { - dynamicStartCache(null, cacheName, null, false, failIfNotStarted).get(); + dynamicStartCache(null, cacheName, null, false, failIfNotStarted, checkThreadTx).get(); cache = jCacheProxies.get(masked); } http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java index 27a7587..b64c69c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java @@ -1626,7 +1626,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V IgniteInternalFuture<?> fut; try { - fut = ctx.kernalContext().cache().dynamicDestroyCache(ctx.name()); + fut = ctx.kernalContext().cache().dynamicDestroyCache(ctx.name(), true); } finally { onLeave(gate); http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java index cd783e4..98848ee 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java @@ -926,8 +926,15 @@ public final class DataStructuresProcessor extends GridProcessorAdapter { CacheConfiguration newCfg = cacheConfiguration(cfg, cacheName); - if (ctx.cache().cache(cacheName) == null) - ctx.cache().dynamicStartCache(newCfg, cacheName, null, CacheType.INTERNAL, false, true).get(); + if (ctx.cache().cache(cacheName) == null) { + ctx.cache().dynamicStartCache(newCfg, + cacheName, + null, + CacheType.INTERNAL, + false, + true, + true).get(); + } assert ctx.cache().cache(cacheName) != null : cacheName; http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java index 65dca08..1c7415f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java @@ -357,7 +357,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter { switch (cmd) { case DESTROY_CACHE: { - fut = ((IgniteKernal)ctx.grid()).destroyCacheAsync(cacheName).chain( + fut = ((IgniteKernal)ctx.grid()).destroyCacheAsync(cacheName, false).chain( new CX1<IgniteInternalFuture<?>, GridRestResponse>() { @Override public GridRestResponse applyx(IgniteInternalFuture<?> f) throws IgniteCheckedException { @@ -369,7 +369,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter { } case GET_OR_CREATE_CACHE: { - fut = ((IgniteKernal)ctx.grid()).getOrCreateCacheAsync(cacheName).chain( + fut = ((IgniteKernal)ctx.grid()).getOrCreateCacheAsync(cacheName, false).chain( new CX1<IgniteInternalFuture<?>, GridRestResponse>() { @Override public GridRestResponse applyx(IgniteInternalFuture<?> f) throws IgniteCheckedException { http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java index 8a5dfd4..04add6b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java @@ -158,7 +158,12 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { ccfg.setName(DYNAMIC_CACHE_NAME); - futs.add(kernal.context().cache().dynamicStartCache(ccfg, ccfg.getName(), null, true, true)); + futs.add(kernal.context().cache().dynamicStartCache(ccfg, + ccfg.getName(), + null, + true, + true, + true)); return null; } @@ -190,7 +195,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { GridTestUtils.runMultiThreaded(new Callable<Object>() { @Override public Object call() throws Exception { - futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME)); + futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true)); return null; } @@ -218,7 +223,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { IgniteEx kernal = grid(ThreadLocalRandom.current().nextInt(nodeCount())); - futs.add(kernal.context().cache().dynamicStartCache(ccfg, ccfg.getName(), null, true, true)); + futs.add(kernal.context().cache().dynamicStartCache(ccfg, ccfg.getName(), null, true, true, true)); return null; } @@ -252,7 +257,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { @Override public Object call() throws Exception { IgniteEx kernal = grid(ThreadLocalRandom.current().nextInt(nodeCount())); - futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME)); + futs.add(kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true)); return null; } @@ -315,7 +320,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { for (int g = 0; g < nodeCount(); g++) caches[g] = grid(g).cache(DYNAMIC_CACHE_NAME); - kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get(); + kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true).get(); for (int g = 0; g < nodeCount(); g++) { final IgniteKernal kernal0 = (IgniteKernal) grid(g); @@ -368,7 +373,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { } // Undeploy cache. - kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get(); + kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true).get(); startGrid(nodeCount() + 1); @@ -445,7 +450,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { }, IllegalArgumentException.class, null); } - kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get(); + kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true).get(); stopGrid(nodeCount() + 1); stopGrid(nodeCount()); @@ -512,7 +517,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { for (int g = 0; g < nodeCount() + 1; g++) assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1")); - kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get(); + kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true).get(); } finally { stopGrid(nodeCount()); @@ -554,7 +559,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { for (int g = 0; g < nodeCount() + 1; g++) assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1")); - kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get(); + kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true).get(); } finally { stopGrid(nodeCount()); @@ -600,7 +605,7 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest { for (int g = 0; g < nodeCount() + 1; g++) assertEquals("1", ignite(g).cache(DYNAMIC_CACHE_NAME).get("1")); - kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME).get(); + kernal.context().cache().dynamicDestroyCache(DYNAMIC_CACHE_NAME, true).get(); } finally { stopGrid(nodeCount()); http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java index 6089795..552dd28 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/nio/GridNioSelfTest.java @@ -569,9 +569,9 @@ public class GridNioSelfTest extends GridCommonAbstractTest { GridNioServerListener lsnr, @Nullable Integer queueLimit) throws Exception { for (int i = 0; i < 10; i++) { - try { - int srvPort = port++; + int srvPort = port++; + try { GridNioServer.Builder<?> builder = serverBuilder(srvPort, parser, lsnr); if (queueLimit != null) @@ -584,8 +584,11 @@ public class GridNioSelfTest extends GridCommonAbstractTest { return srvr; } catch (IgniteCheckedException e) { - if (i < 9 && e.hasCause(BindException.class)) - log.error("Failed to start server, will try another port: " + e); + if (i < 9 && e.hasCause(BindException.class)) { + log.error("Failed to start server, will try another port [err=" + e + ", port=" + srvPort + ']'); + + U.sleep(5000); + } else throw e; } http://git-wip-us.apache.org/repos/asf/ignite/blob/a24168dc/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java index b490983..85b6e93 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite3.java @@ -34,11 +34,10 @@ public class IgniteCacheFailoverTestSuite3 extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new TestSuite("Cache Failover Test Suite3"); + suite.addTestSuite(IgniteCachePutRetryAtomicSelfTest.class); + suite.addTestSuite(IgniteCachePutRetryAtomicPrimaryWriteOrderSelfTest.class); suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); - suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); - suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); - suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); - suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); + suite.addTestSuite(CacheGetInsideLockChangingTopologyTest.class); return suite; }