Fixed updateSequence updating in GridDhtPartitionMap. - Fixes
@@ -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,8 +201,12 @@ public class GridDhtPartitionMap implements Comparable<GridDhtPartitionMap>, 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;
+ // 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;
