Repository: ignite Updated Branches: refs/heads/master 935e71271 -> 5818b198b
IGNITE-9384 Fixed PCPC problem for transactions. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5818b198 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5818b198 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5818b198 Branch: refs/heads/master Commit: 5818b198be425245f92e0de1c7c10b1e87453c93 Parents: 935e712 Author: Andrey Gura <[email protected]> Authored: Mon Sep 10 19:25:47 2018 +0300 Committer: Andrey Gura <[email protected]> Committed: Mon Sep 17 01:26:30 2018 +0300 ---------------------------------------------------------------------- .../cache/distributed/dht/GridDhtTxPrepareFuture.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/5818b198/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java index 8ac5419..1974038 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java @@ -803,13 +803,10 @@ public final class GridDhtTxPrepareFuture extends GridCacheCompoundFuture<Ignite if (REPLIED_UPD.compareAndSet(this, 0, 1)) { GridNearTxPrepareResponse res = createPrepareResponse(this.err); - try { - sendPrepareResponse(res); - } - finally { - // Will call super.onDone(). - onComplete(res); - } + // Will call super.onDone(). + onComplete(res); + + sendPrepareResponse(res); return true; } @@ -1004,7 +1001,7 @@ public final class GridDhtTxPrepareFuture extends GridCacheCompoundFuture<Ignite * @return {@code True} if {@code done} flag was changed as a result of this call. */ private boolean onComplete(@Nullable GridNearTxPrepareResponse res) { - if (last || tx.isSystemInvalidate()) + if ((last || tx.isSystemInvalidate()) && !(tx.near() && tx.local())) tx.state(PREPARED); if (super.onDone(res, res == null ? err : null)) {
