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 DA5EC18A50 for ; Tue, 11 Aug 2015 17:36:14 +0000 (UTC) Received: (qmail 66336 invoked by uid 500); 11 Aug 2015 17:36:02 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 66306 invoked by uid 500); 11 Aug 2015 17:36: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 66297 invoked by uid 99); 11 Aug 2015 17:36:02 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2015 17:36:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9979A18193D for ; Tue, 11 Aug 2015 17:36:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 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, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 1k0WRx-EtyMR for ; Tue, 11 Aug 2015 17:36:00 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 8BACD267C9 for ; Tue, 11 Aug 2015 17:35:54 +0000 (UTC) Received: (qmail 65949 invoked by uid 99); 11 Aug 2015 17:35: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, 11 Aug 2015 17:35:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 562C0E2F3C; Tue, 11 Aug 2015 17:35: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 Date: Tue, 11 Aug 2015 17:36:00 -0000 Message-Id: In-Reply-To: <9238fadcfb92456db3e45402d4be3bc7@git.apache.org> References: <9238fadcfb92456db3e45402d4be3bc7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/17] incubator-ignite git commit: ignite-1189: fixing deadlock ignite-1189: fixing deadlock Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/4d528bec Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/4d528bec Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/4d528bec Branch: refs/heads/ignite-1175 Commit: 4d528becc1cd3db9d4d2d6db2053895043aa3918 Parents: 132562b Author: Denis Magda Authored: Tue Aug 4 13:04:35 2015 +0300 Committer: Denis Magda Committed: Tue Aug 4 13:04:35 2015 +0300 ---------------------------------------------------------------------- .../dht/atomic/GridDhtAtomicCache.java | 29 +++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4d528bec/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 cd6e28d..470efdd 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 @@ -1176,6 +1176,12 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { } catch (Exception e) { U.error(log, "Unexpected exception during cache update", e); + + res.addFailedKeys(keys, e); + + completionCb.apply(req, res); + + return; } if (remap) { @@ -2167,19 +2173,22 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { // Enqueue entries while holding locks. Collection skip = null; - for (GridCacheMapEntry entry : locked) { - if (entry != null && entry.deleted()) { - if (skip == null) - skip = new HashSet<>(locked.size(), 1.0f); + try { + for (GridCacheMapEntry entry : locked) { + if (entry != null && entry.deleted()) { + if (skip == null) + skip = new HashSet<>(locked.size(), 1.0f); - skip.add(entry.key()); + skip.add(entry.key()); + } } } - - // Release locks. - for (GridCacheMapEntry entry : locked) { - if (entry != null) - UNSAFE.monitorExit(entry); + finally { + // Release locks. + for (GridCacheMapEntry entry : locked) { + if (entry != null) + UNSAFE.monitorExit(entry); + } } // Try evict partitions.