Repository: ignite Updated Branches: refs/heads/ignite-4424 ff0cff503 -> f5db458a8
IGNITE-4424 REPLICATED cache isn't synced across nodes Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f5db458a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f5db458a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f5db458a Branch: refs/heads/ignite-4424 Commit: f5db458a8a3010e2c2a4c4f71e9810f1c5b6490f Parents: ff0cff5 Author: Anton Vinogradov <[email protected]> Authored: Mon Dec 26 15:37:04 2016 +0300 Committer: Anton Vinogradov <[email protected]> Committed: Mon Dec 26 15:37:04 2016 +0300 ---------------------------------------------------------------------- .../dht/atomic/GridNearAtomicAbstractUpdateFuture.java | 8 ++++++++ .../dht/atomic/GridNearAtomicSingleUpdateFuture.java | 6 ++---- .../distributed/dht/atomic/GridNearAtomicUpdateFuture.java | 6 ++---- 3 files changed, 12 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/f5db458a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java index 8a1b678..2a2aa55 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java @@ -329,6 +329,14 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt protected final GridCacheVersion addAtomicFuture(AffinityTopologyVersion topVer) { GridCacheVersion futVer = cctx.versions().next(topVer); + synchronized (mux) { + assert this.futVer == null : this; + assert this.topVer == AffinityTopologyVersion.ZERO : this; + + this.topVer = topVer; + this.futVer = futVer; + } + if (storeFuture()) { if (!cctx.mvcc().addAtomicFuture(futVer, this)) { assert isDone() : this; http://git-wip-us.apache.org/repos/asf/ignite/blob/f5db458a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java index 65aaff9..97a0b41 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java @@ -470,12 +470,10 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda singleReq0 = mapSingleUpdate(topVer, futVer, updVer); synchronized (mux) { - assert this.futVer == null : this; - assert this.topVer == AffinityTopologyVersion.ZERO : this; + assert this.futVer == futVer || this.error() != null; + assert this.topVer == topVer; - this.topVer = topVer; this.updVer = updVer; - this.futVer = futVer; resCnt = 0; http://git-wip-us.apache.org/repos/asf/ignite/blob/f5db458a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java index a23b5d0..fc944f3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java @@ -675,12 +675,10 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu } synchronized (mux) { - assert this.futVer == null : this; - assert this.topVer == AffinityTopologyVersion.ZERO : this; + assert this.futVer == futVer || this.error() != null; + assert this.topVer == topVer; - this.topVer = topVer; this.updVer = updVer; - this.futVer = futVer; resCnt = 0;
