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 D5C3A200CBF for ; Fri, 2 Jun 2017 19:13:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D325B160BDD; Fri, 2 Jun 2017 17:13:17 +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 B1DCF160BF2 for ; Fri, 2 Jun 2017 19:13:16 +0200 (CEST) Received: (qmail 80030 invoked by uid 500); 2 Jun 2017 17:13:15 -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 79127 invoked by uid 99); 2 Jun 2017 17:13:14 -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; Fri, 02 Jun 2017 17:13:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CDDA6E0285; Fri, 2 Jun 2017 17:13: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: Fri, 02 Jun 2017 17:13:39 -0000 Message-Id: <98c8fc3941b544f18b2cd9cb34543e41@git.apache.org> In-Reply-To: <4c530179ed0447069b35932ef372a970@git.apache.org> References: <4c530179ed0447069b35932ef372a970@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [26/49] ignite git commit: Renting primary node - fix. archived-at: Fri, 02 Jun 2017 17:13:18 -0000 Renting primary node - fix. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/767fe9ab Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/767fe9ab Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/767fe9ab Branch: refs/heads/ignite-5398 Commit: 767fe9abd578302159caaa59502f5ffb6f53336c Parents: b29b918 Author: Ilya Lantukh Authored: Tue May 23 18:56:07 2017 +0300 Committer: Ilya Lantukh Committed: Tue May 23 18:56:07 2017 +0300 ---------------------------------------------------------------------- .../dht/preloader/GridDhtPartitionsExchangeFuture.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/767fe9ab/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index fff1702..ac5a5b5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -1707,7 +1707,17 @@ public class GridDhtPartitionsExchangeFuture extends GridFutureAdapter maxCntr.cnt) + if (maxCntr == null && cntr == 0) { + CounterWithNodes cntrObj = new CounterWithNodes(cntr, cctx.localNodeId()); + + for (UUID nodeId : msgs.keySet()) { + if (top.partitionState(nodeId, part.id()) == GridDhtPartitionState.OWNING) + cntrObj.nodes.add(nodeId); + } + + maxCntrs.put(part.id(), cntrObj); + } + else if (maxCntr == null || cntr > maxCntr.cnt) maxCntrs.put(part.id(), new CounterWithNodes(cntr, cctx.localNodeId())); else if (cntr == maxCntr.cnt) maxCntr.nodes.add(cctx.localNodeId());