Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8F2FF200D18 for ; Tue, 26 Sep 2017 12:48:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8DA941609C1; Tue, 26 Sep 2017 10:48:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E4D0B1609B4 for ; Tue, 26 Sep 2017 12:48:18 +0200 (CEST) Received: (qmail 54293 invoked by uid 500); 26 Sep 2017 10:48:18 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 53197 invoked by uid 99); 26 Sep 2017 10:48:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2017 10:48:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id ABC36F5B45; Tue, 26 Sep 2017 10:48:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agoncharuk@apache.org To: commits@ignite.apache.org Date: Tue, 26 Sep 2017 10:48:54 -0000 Message-Id: <4842ee16db5a46b6b4745180d37d60f1@git.apache.org> In-Reply-To: <837a417004ee422c836e9b3a32230ff0@git.apache.org> References: <837a417004ee422c836e9b3a32230ff0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [41/50] [abbrv] ignite git commit: IGNITE-6355 Calculating cache size during cache stop sporadically fails with ClusterGroupEmptyCheckedException - Fixes #2647. archived-at: Tue, 26 Sep 2017 10:48:21 -0000 IGNITE-6355 Calculating cache size during cache stop sporadically fails with ClusterGroupEmptyCheckedException - Fixes #2647. Signed-off-by: Alexey Goncharuk (cherry picked from commit 0dd9755) (cherry picked from commit 297ed38) Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9f5c9e38 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9f5c9e38 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9f5c9e38 Branch: refs/heads/ignite-gg-12822 Commit: 9f5c9e385e258c48ce29ca4e9cec222f737eb910 Parents: 7daefd2 Author: Ivan Rakov Authored: Mon Sep 18 16:58:10 2017 +0300 Committer: Dmitriy Govorukhin Committed: Fri Sep 22 15:29:09 2017 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheAdapter.java | 17 ++++++----------- .../processors/cache/IgniteCacheProxyImpl.java | 8 ++++---- 2 files changed, 10 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/9f5c9e38/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 382b94d..40f2b49 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 @@ -3730,20 +3730,15 @@ public abstract class GridCacheAdapter implements IgniteInternalCache nodes = grp.nodes(); + Collection nodes = new ArrayList<>(grp.nodes()); if (nodes.isEmpty()) return new GridFinishedFuture<>(0); ctx.kernalContext().task().setThreadContext(TC_SUBGRID, nodes); - try { - return ctx.kernalContext().task().execute( - new SizeTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes), null); - } - catch (ClusterGroupEmptyException e) { - return new GridFinishedFuture<>(0); - } + return ctx.kernalContext().task().execute( + new SizeTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes), null); } /** {@inheritDoc} */ @@ -3756,7 +3751,7 @@ public abstract class GridCacheAdapter implements IgniteInternalCache nodes = grp.nodes(); + Collection nodes = new ArrayList<>(grp.nodes()); if (nodes.isEmpty()) return new GridFinishedFuture<>(0L); @@ -3779,13 +3774,13 @@ public abstract class GridCacheAdapter implements IgniteInternalCache nodes = grp.forPredicate(new IgnitePredicate() { + Collection nodes = new ArrayList<>(grp.forPredicate(new IgnitePredicate() { /** {@inheritDoc} */ @Override public boolean apply(ClusterNode clusterNode) { return ((modes.primary && aff.primaryByPartition(clusterNode, part, topVer)) || (modes.backup && aff.backupByPartition(clusterNode, part, topVer))); } - }).nodes(); + }).nodes()); if (nodes.isEmpty()) return new GridFinishedFuture<>(0L); http://git-wip-us.apache.org/repos/asf/ignite/blob/9f5c9e38/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java index 54fcafa..337c1bb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java @@ -1662,10 +1662,10 @@ public class IgniteCacheProxyImpl extends AsyncSupportAdapter restartFut = this.restartFut.get(); - if (restartFut != null && !restartFut.isDone()) { + if (restartFut != null) { if (X.hasCause(e, CacheStoppedException.class) || X.hasSuppressed(e, CacheStoppedException.class)) throw new IgniteCacheRestartingException(new IgniteFutureImpl<>(restartFut), "Cache is restarting: " + - ctx.name()); + ctx.name(), e); } if (e instanceof IgniteCheckedException) @@ -1816,9 +1816,9 @@ public class IgniteCacheProxyImpl extends AsyncSupportAdapter