You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/08/29 14:38:27 UTC
[13/16] ignite git commit: Fixed update sequence.
Fixed update sequence.
Signed-off-by: Andrey Gura <ag...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/45643050
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/45643050
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/45643050
Branch: refs/heads/master
Commit: 45643050b8f298b87afe7bf1f1ba5de1d3156254
Parents: df4969b
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Fri Aug 25 21:23:19 2017 +0300
Committer: Andrey Gura <ag...@apache.org>
Committed: Tue Aug 29 17:32:04 2017 +0300
----------------------------------------------------------------------
.../distributed/dht/GridDhtPartitionTopologyImpl.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/45643050/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 87b3670..a881130 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
@@ -1910,6 +1910,14 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
}
}
+ long seqVal = 0;
+
+ if (updateSeq) {
+ seqVal = this.updateSeq.incrementAndGet();
+
+ node2part = new GridDhtPartitionFullMap(node2part, seqVal);
+ }
+
for (Map.Entry<UUID, GridDhtPartitionMap> e : node2part.entrySet()) {
GridDhtPartitionMap partMap = e.getValue();
@@ -1925,16 +1933,14 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
result.add(e.getKey());
}
- partMap.updateSequence(partMap.updateSequence() + 1, partMap.topologyVersion());
+ if (updateSeq)
+ partMap.updateSequence(seqVal, partMap.topologyVersion());
U.warn(log, "Partition has been scheduled for rebalancing due to outdated update counter " +
"[nodeId=" + e.getKey() + ", cacheOrGroupName=" + grp.cacheOrGroupName() +
", partId=" + p + ", haveHistory=" + haveHistory + "]");
}
}
-
- if (updateSeq)
- node2part = new GridDhtPartitionFullMap(node2part, this.updateSeq.incrementAndGet());
}
finally {
lock.writeLock().unlock();