You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/08/21 13:52:12 UTC

[11/40] incubator-ignite git commit: # ignite-1265 fix prepare future

# ignite-1265 fix prepare future


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/00417376
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/00417376
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/00417376

Branch: refs/heads/ignite-1258
Commit: 00417376c829c8a01cfc6ccbe5d328f01e23bf45
Parents: 7f928dc
Author: sboikov <sb...@gridgain.com>
Authored: Wed Aug 19 17:48:47 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Aug 19 17:48:47 2015 +0300

----------------------------------------------------------------------
 .../distributed/dht/GridDhtTxPrepareFuture.java | 41 ++++++++++----------
 1 file changed, 20 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/00417376/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 08d02f2..cd51b7b 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
@@ -297,34 +297,33 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
                 if (hasFilters || retVal || txEntry.op() == DELETE || txEntry.op() == TRANSFORM) {
                     CacheObject val;
 
-                    if (!txEntry.hasValue()) {
-                        cached.unswap(retVal);
+                    cached.unswap(retVal);
 
-                        boolean readThrough = (retVal || hasFilters) &&
-                            cacheCtx.config().isLoadPreviousValue() &&
-                            !txEntry.skipStore();
+                    boolean readThrough = (retVal || hasFilters) &&
+                        cacheCtx.config().isLoadPreviousValue() &&
+                        !txEntry.skipStore();
 
-                        val = cached.innerGet(
-                            tx,
-                            /*swap*/true,
-                            readThrough,
-                            /*fail fast*/false,
-                            /*unmarshal*/true,
-                            /*metrics*/retVal,
-                            /*event*/retVal,
-                            /*tmp*/false,
-                            null,
-                            null,
-                            null,
-                            null);
-                    }
-                    else
-                        val = txEntry.value();
+                    val = cached.innerGet(
+                        tx,
+                        /*swap*/true,
+                        readThrough,
+                        /*fail fast*/false,
+                        /*unmarshal*/true,
+                        /*metrics*/retVal,
+                        /*event*/retVal,
+                        /*tmp*/false,
+                        null,
+                        null,
+                        null,
+                        null);
 
                     if (retVal || txEntry.op() == TRANSFORM) {
                         if (!F.isEmpty(txEntry.entryProcessors())) {
                             invoke = true;
 
+                            if (txEntry.hasValue())
+                                val = txEntry.value();
+
                             KeyCacheObject key = txEntry.key();
 
                             Object procRes = null;