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 86EC8200CE7 for ; Wed, 2 Aug 2017 11:03:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 85A0B168C8F; Wed, 2 Aug 2017 09:03:20 +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 B0E70168C18 for ; Wed, 2 Aug 2017 11:03:19 +0200 (CEST) Received: (qmail 34391 invoked by uid 500); 2 Aug 2017 09:03:18 -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 34171 invoked by uid 99); 2 Aug 2017 09:03:18 -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; Wed, 02 Aug 2017 09:03:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CE379F3344; Wed, 2 Aug 2017 09:03:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Wed, 02 Aug 2017 09:03:25 -0000 Message-Id: In-Reply-To: <8f77d8738b2a45f5842c89254fd7a7be@git.apache.org> References: <8f77d8738b2a45f5842c89254fd7a7be@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [11/11] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-5578 archived-at: Wed, 02 Aug 2017 09:03:20 -0000 Merge remote-tracking branch 'remotes/origin/master' into ignite-5578 # Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java # modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/760adcab Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/760adcab Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/760adcab Branch: refs/heads/ignite-5578 Commit: 760adcab14d6dcf31998c25ddee5b1cb9e803794 Parents: 2d4b194 Author: sboikov Authored: Wed Aug 2 12:03:06 2017 +0300 Committer: sboikov Committed: Wed Aug 2 12:03:06 2017 +0300 ---------------------------------------------------------------------- .../dht/GridDhtPartitionTopologyImpl.java | 34 +++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/760adcab/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java index ab0aec7..bbc3962 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java @@ -669,7 +669,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { updateRebalanceVersion(aff); if (node2part != null && node2part.valid()) - changed |= checkEvictions(updateSeq, aff); + changed |= checkEvictions(updateSeq, topVer, aff); consistencyCheck(); } @@ -786,15 +786,17 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { if (loc != null && state == EVICTED) { locParts.set(p, loc = null); - if (!belongs) + if (!belongs) { throw new GridDhtInvalidPartitionException(p, "Adding entry to evicted partition " + "(often may be caused by inconsistent 'key.hashCode()' implementation) " + "[part=" + p + ", topVer=" + topVer + ", this.topVer=" + this.readyTopVer + ']'); + } } - else if (loc != null && state == RENTING && !showRenting) + else if (loc != null && state == RENTING && !showRenting) { throw new GridDhtInvalidPartitionException(p, "Adding entry to partition that is concurrently " + "evicted [part=" + p + ", shouldBeMoving=" + loc.reload() + ", belongs=" + belongs + - ", topVer=" + topVer + ", curTopVer=" + this.topVer + "]"); + ", topVer=" + topVer + ", curTopVer=" + this.readyTopVer + "]"); + } if (loc == null) { if (!belongs) @@ -1143,13 +1145,13 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { /** {@inheritDoc} */ @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"}) @Override public boolean update( - @Nullable AffinityTopologyVersion exchangeResVer, + @Nullable AffinityTopologyVersion exchangeVer, GridDhtPartitionFullMap partMap, @Nullable Map> incomeCntrMap, Set partsToReload, @Nullable AffinityTopologyVersion msgTopVer) { if (log.isDebugEnabled()) - log.debug("Updating full partition map [exchVer=" + exchangeResVer + ", parts=" + fullMapString() + ']'); + log.debug("Updating full partition map [exchVer=" + exchangeVer + ", parts=" + fullMapString() + ']'); assert partMap != null; @@ -1182,20 +1184,20 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { } } - if (exchangeResVer != null) { + if (exchangeVer != null) { // Ignore if exchange already finished or new exchange started. - if (readyTopVer.compareTo(exchangeResVer) > 0 || lastTopChangeVer.compareTo(exchangeResVer) > 0) { + if (readyTopVer.compareTo(exchangeVer) > 0 || lastTopChangeVer.compareTo(exchangeVer) > 0) { if (log.isDebugEnabled()) { log.debug("Stale exchange id for full partition map update (will ignore) [" + "lastTopChange=" + lastTopChangeVer + ", readTopVer=" + readyTopVer + - ", exchVer=" + exchangeResVer + ']'); + ", exchVer=" + exchangeVer + ']'); } U.warn(log, "Stale exchange id for full partition map update (will ignore) [" + "lastTopChange=" + lastTopChangeVer + ", readTopVer=" + readyTopVer + - ", exchVer=" + exchangeResVer + ']'); + ", exchVer=" + exchangeVer + ']'); return false; } @@ -1227,7 +1229,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { fullMapUpdated = true; if (log.isDebugEnabled()) { - log.debug("Overriding partition map in full update map [exchVer=" + exchangeResVer + + log.debug("Overriding partition map in full update map [exchVer=" + exchangeVer + ", curPart=" + mapString(part) + ", newPart=" + mapString(newPart) + ']'); } @@ -1264,7 +1266,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { if (!fullMapUpdated) { if (log.isDebugEnabled()) { log.debug("No updates for full partition map (will ignore) [lastExch=" + lastTopChangeVer + - ", exchVer=" + exchangeResVer + + ", exchVer=" + exchangeVer + ", curMap=" + node2part + ", newMap=" + partMap + ']'); } @@ -1272,15 +1274,15 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology { return false; } - if (exchangeResVer != null) { - assert exchangeResVer.compareTo(readyTopVer) >= 0 && exchangeResVer.compareTo(lastTopChangeVer) >= 0; + if (exchangeVer != null) { + assert exchangeVer.compareTo(readyTopVer) >= 0 && exchangeVer.compareTo(lastTopChangeVer) >= 0; - lastTopChangeVer = readyTopVer = exchangeResVer; + lastTopChangeVer = readyTopVer = exchangeVer; } node2part = partMap; - if (exchangeResVer == null && (readyTopVer.initialized() && readyTopVer.compareTo(diffFromAffinityVer) >= 0)) { + if (exchangeVer == null && (readyTopVer.initialized() && readyTopVer.compareTo(diffFromAffinityVer) >= 0)) { AffinityAssignment affAssignment = grp.affinity().readyAffinity(readyTopVer); for (Map.Entry e : partMap.entrySet()) {