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 EB310200CD3 for ; Fri, 28 Jul 2017 14:07:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E9A3816CAC0; Fri, 28 Jul 2017 12:07:16 +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 D2FF916C97F for ; Fri, 28 Jul 2017 14:07:15 +0200 (CEST) Received: (qmail 33154 invoked by uid 500); 28 Jul 2017 12:07: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 33042 invoked by uid 99); 28 Jul 2017 12:07:15 -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, 28 Jul 2017 12:07:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DB5FAF32B9; Fri, 28 Jul 2017 12:07:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yzhdanov@apache.org To: commits@ignite.apache.org Date: Fri, 28 Jul 2017 12:07:24 -0000 Message-Id: <65fc7403b44f4e319a2c1a9a10bcc6e3@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [12/50] [abbrv] ignite git commit: IGNITE-5752 Fixed updateSequence updating in GridDhtPartitionMap. - Fixes #2297. archived-at: Fri, 28 Jul 2017 12:07:17 -0000 IGNITE-5752 Fixed updateSequence updating in GridDhtPartitionMap. - Fixes #2297. Signed-off-by: Alexey Goncharuk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/199b9543 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/199b9543 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/199b9543 Branch: refs/heads/ignite-5658 Commit: 199b954345f179851718acd131188506668cd4f3 Parents: 02a1bdc Author: Pavel Kovalenko Authored: Fri Jul 21 16:29:15 2017 +0300 Committer: Alexey Goncharuk Committed: Fri Jul 21 16:29:15 2017 +0300 ---------------------------------------------------------------------- .../cache/distributed/dht/preloader/GridDhtPartitionMap.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/199b9543/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap.java index cfd4400..735ca1e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionMap.java @@ -24,7 +24,6 @@ import java.io.ObjectOutput; import java.util.Map; import java.util.Set; import java.util.UUID; - import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState; @@ -202,9 +201,13 @@ public class GridDhtPartitionMap implements Comparable, Ext * @return Old update sequence value. */ public long updateSequence(long updateSeq, AffinityTopologyVersion topVer) { + assert topVer.compareTo(top) >= 0 : "Invalid topology version [cur=" + top + ", new=" + topVer + "]"; + long old = this.updateSeq; - assert updateSeq >= old : "Invalid update sequence [cur=" + old + ", new=" + updateSeq + ']'; + // Overwrite update sequence without checking in case of greater topology version + if (topVer.compareTo(top) == 0) + assert updateSeq >= old : "Invalid update sequence [cur=" + old + ", new=" + updateSeq + ']'; this.updateSeq = updateSeq;