You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/05/03 07:22:16 UTC
[38/50] [abbrv] ignite git commit: GG-11894 - Fixed
IgniteDbSnapshotSelfTest.testReuseCacheProxyAfterRestore
GG-11894 - Fixed IgniteDbSnapshotSelfTest.testReuseCacheProxyAfterRestore
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9d71e315
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9d71e315
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9d71e315
Branch: refs/heads/ignite-gg-8.0.3.ea6-clients-test
Commit: 9d71e3159ca4cc95e6943e637d7fa74cabf22d77
Parents: 3a68d85
Author: Ivan Rakov <iv...@gmail.com>
Authored: Fri Mar 31 17:21:02 2017 +0300
Committer: Ivan Rakov <iv...@gmail.com>
Committed: Fri Mar 31 17:21:02 2017 +0300
----------------------------------------------------------------------
.../ignite/internal/processors/cache/GridCacheAdapter.java | 9 +++++++--
.../ignite/internal/processors/cache/GridCacheGateway.java | 4 ++--
2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9d71e315/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 1470a97..288eafc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -58,6 +58,7 @@ import org.apache.ignite.cache.CacheMetrics;
import org.apache.ignite.cache.CachePeekMode;
import org.apache.ignite.cache.affinity.Affinity;
import org.apache.ignite.cluster.ClusterGroup;
+import org.apache.ignite.cluster.ClusterGroupEmptyException;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.cluster.ClusterTopologyException;
import org.apache.ignite.compute.ComputeJob;
@@ -3802,8 +3803,12 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
ctx.kernalContext().task().setThreadContext(TC_SUBGRID, nodes);
- return ctx.kernalContext().task().execute(
- new SizeTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes), null);
+ try {
+ return ctx.kernalContext().task().execute(
+ new SizeTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes), null);
+ } catch (ClusterGroupEmptyException e) {
+ return new GridFinishedFuture<>(0);
+ }
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/9d71e315/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
index 1562d70..4314211 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheGateway.java
@@ -82,7 +82,7 @@ public class GridCacheGateway<K, V> {
if (state == State.STOPPED) {
if (stopErr)
- throw new IllegalStateException("Cache has been stopped: " + ctx.name());
+ throw new IllegalStateException(new CacheStoppedException(ctx.name()));
else
return false;
}
@@ -157,7 +157,7 @@ public class GridCacheGateway<K, V> {
GridCachePreloader preldr = cache != null ? cache.preloader() : null;
if (preldr == null)
- throw new IllegalStateException("Cache has been closed or destroyed: " + ctx.name());
+ throw new IllegalStateException(new CacheStoppedException(ctx.name()));
preldr.startFuture().get();
}