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 D5AFC18D8B for ; Mon, 3 Aug 2015 23:53:29 +0000 (UTC) Received: (qmail 26796 invoked by uid 500); 3 Aug 2015 23:53:29 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 26766 invoked by uid 500); 3 Aug 2015 23:53:29 -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 26757 invoked by uid 99); 3 Aug 2015 23:53:29 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Aug 2015 23:53:29 +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 13873D9F2A for ; Mon, 3 Aug 2015 23:53:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.553 X-Spam-Level: * X-Spam-Status: No, score=1.553 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=-0.228, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 74Lx3MoMaVxm for ; Mon, 3 Aug 2015 23:53:16 +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 090BD26777 for ; Mon, 3 Aug 2015 23:53:16 +0000 (UTC) Received: (qmail 24190 invoked by uid 99); 3 Aug 2015 23:52:00 -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; Mon, 03 Aug 2015 23:52:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C5684E0922; Mon, 3 Aug 2015 23:52:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vkulichenko@apache.org To: commits@ignite.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-ignite git commit: IGNITE-104 - Ordered ATOMIC updates Date: Mon, 3 Aug 2015 23:52:00 +0000 (UTC) Repository: incubator-ignite Updated Branches: refs/heads/ignite-104 55a2fc6b1 -> b27af71d8 IGNITE-104 - Ordered ATOMIC updates Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b27af71d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b27af71d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b27af71d Branch: refs/heads/ignite-104 Commit: b27af71d81274ed351d5c43740f5c904db62adfb Parents: 55a2fc6 Author: Valentin Kulichenko Authored: Mon Aug 3 16:51:53 2015 -0700 Committer: Valentin Kulichenko Committed: Mon Aug 3 16:51:53 2015 -0700 ---------------------------------------------------------------------- .../dht/atomic/GridDhtAtomicCache.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b27af71d/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 9328932..4f1b887 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 @@ -2409,7 +2409,25 @@ public class GridDhtAtomicCache extends GridDhtCacheAdapter { * @param nodeId Sender node ID. * @param req Dht atomic update request. */ - private void processDhtAtomicUpdateRequest(UUID nodeId, GridDhtAtomicUpdateRequest req) { + private void processDhtAtomicUpdateRequest(final UUID nodeId, final GridDhtAtomicUpdateRequest req) { + IgniteInternalFuture fut = ctx.preloader().request(req.keys(), req.topologyVersion()); + + if (fut.isDone()) + processDhtAtomicUpdateRequest0(nodeId, req); + else { + fut.listen(new CI1() { + @Override public void apply(IgniteInternalFuture future) { + processDhtAtomicUpdateRequest0(nodeId, req); + } + }); + } + } + + /** + * @param nodeId Sender node ID. + * @param req Dht atomic update request. + */ + private void processDhtAtomicUpdateRequest0(UUID nodeId, GridDhtAtomicUpdateRequest req) { if (log.isDebugEnabled()) log.debug("Processing dht atomic update request [nodeId=" + nodeId + ", req=" + req + ']');