Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9439A17ABB for ; Tue, 23 Jun 2015 07:53:02 +0000 (UTC) Received: (qmail 93192 invoked by uid 500); 23 Jun 2015 07:53:02 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 93157 invoked by uid 500); 23 Jun 2015 07:53:02 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 93148 invoked by uid 99); 23 Jun 2015 07:53:02 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2015 07:53:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 13C83CF9FF for ; Tue, 23 Jun 2015 07:53:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.428, T_FILL_THIS_FORM_SHORT=0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 7s6qYs009GkS for ; Tue, 23 Jun 2015 07:52:55 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 7DE7143E3E for ; Tue, 23 Jun 2015 07:52:55 +0000 (UTC) Received: (qmail 92556 invoked by uid 99); 23 Jun 2015 07:52:54 -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, 23 Jun 2015 07:52:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B2592DFDAE; Tue, 23 Jun 2015 07:52:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-ignite git commit: ignite-1048 create/lock entries before topology read lock Date: Tue, 23 Jun 2015 07:52:54 +0000 (UTC) Repository: incubator-ignite Updated Branches: refs/heads/ignite-1048 [created] be881a367 ignite-1048 create/lock entries before topology read lock Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/be881a36 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/be881a36 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/be881a36 Branch: refs/heads/ignite-1048 Commit: be881a367ef02a724c2b84aba8f72c6effadc2b2 Parents: 1c66078 Author: sboikov Authored: Tue Jun 23 10:52:47 2015 +0300 Committer: sboikov Committed: Tue Jun 23 10:52:47 2015 +0300 ---------------------------------------------------------------------- .../cache/distributed/dht/GridDhtLocalPartition.java | 3 ++- .../cache/distributed/dht/atomic/GridDhtAtomicCache.java | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be881a36/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java index 3a577a7..87c7f0e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java @@ -236,7 +236,8 @@ public class GridDhtLocalPartition implements Comparable, void onAdded(GridDhtCacheEntry entry) { GridDhtPartitionState state = state(); - assert state != EVICTED : "Adding entry to invalid partition: " + this; + if (state == EVICTED) + throw new GridDhtInvalidPartitionException(id, "Adding entry to invalid partition [part=" + id + ']'); map.put(entry.key(), entry); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be881a36/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index 8630421..7bec302 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -1028,7 +1028,10 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { IgniteCacheExpiryPolicy expiry = null; try { - List locked = null; + // If batch store update is enabled, we need to lock all entries. + // First, need to acquire locks on cache entries, then check filter. + List locked = lockEntries(keys, req.topologyVersion()); + Collection> deleted = null; try { @@ -1058,10 +1061,6 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { return; } - // If batch store update is enabled, we need to lock all entries. - // First, need to acquire locks on cache entries, then check filter. - locked = lockEntries(keys, req.topologyVersion()); - boolean hasNear = ctx.discovery().cacheNearNode(node, name()); GridCacheVersion ver = req.updateVersion();