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 DA15E187F6 for ; Tue, 23 Jun 2015 14:31:52 +0000 (UTC) Received: (qmail 31987 invoked by uid 500); 23 Jun 2015 14:31:52 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 31955 invoked by uid 500); 23 Jun 2015 14:31:52 -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 31944 invoked by uid 99); 23 Jun 2015 14:31:52 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2015 14:31:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 58A8AC006D for ; Tue, 23 Jun 2015 14:31:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.781 X-Spam-Level: X-Spam-Status: No, score=0.781 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_FILL_THIS_FORM_SHORT=0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id rdBQq25Q-kgd for ; Tue, 23 Jun 2015 14:31:43 +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 9EE4C4C0D5 for ; Tue, 23 Jun 2015 14:31:42 +0000 (UTC) Received: (qmail 31546 invoked by uid 99); 23 Jun 2015 14:31:42 -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 14:31:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0B4F2E0019; Tue, 23 Jun 2015 14:31:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 23 Jun 2015 14:31:42 -0000 Message-Id: <620c3bd959594d13a88391e09033af3a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] incubator-ignite git commit: ignite-1048 create/lock entries before topology read lock Repository: incubator-ignite Updated Branches: refs/heads/ignite-gg-10356 2bb6e0f88 -> 359b43144 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-gg-10356 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();