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/11/17 12:48:22 UTC
ignite git commit: IGNITE-6947 Abandon remap after single map if
future is done (fixes NPE)
Repository: ignite
Updated Branches:
refs/heads/master e3099cc47 -> 38f66c7f7
IGNITE-6947 Abandon remap after single map if future is done (fixes NPE)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/38f66c7f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/38f66c7f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/38f66c7f
Branch: refs/heads/master
Commit: 38f66c7f7735bab7c7ae581269f67a45246253ba
Parents: e3099cc4
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Fri Nov 17 15:48:12 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 17 15:48:12 2017 +0300
----------------------------------------------------------------------
.../near/GridNearOptimisticTxPrepareFuture.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/38f66c7f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index 6d7a862..6cf076b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -368,13 +368,6 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
GridDistributedTxMapping mapping = map(write, topVer, null, topLocked, remap);
- if (mapping.primary().isLocal()) {
- if (write.context().isNear())
- tx.nearLocallyMapped(true);
- else if (write.context().isColocated())
- tx.colocatedLocallyMapped(true);
- }
-
if (isDone()) {
if (log.isDebugEnabled())
log.debug("Abandoning (re)map because future is done: " + this);
@@ -382,6 +375,13 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
return;
}
+ if (mapping.primary().isLocal()) {
+ if (write.context().isNear())
+ tx.nearLocallyMapped(true);
+ else if (write.context().isColocated())
+ tx.colocatedLocallyMapped(true);
+ }
+
if (keyLockFut != null)
keyLockFut.onAllKeysAdded();