ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [11/24] ignite git commit: ignite-1.5 Fixed tx entry add to always check for enlistWrite errors.
Date Thu, 17 Dec 2015 09:42:01 GMT
ignite-1.5 Fixed tx entry add to always check for enlistWrite errors.


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

Branch: refs/heads/ignite-1.5.1
Commit: 490f552b7a7a205a5dc2d34051c365ccc8e9f205
Parents: 77c6d08
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Dec 16 11:50:03 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Dec 16 11:50:03 2015 +0300

----------------------------------------------------------------------
 .../transactions/IgniteTxLocalAdapter.java      | 23 +++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/490f552b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index a3aed34..720832e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -2952,6 +2952,9 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
             if (pessimistic()) {
                 assert loadFut == null || loadFut.isDone() : loadFut;
 
+                if (loadFut != null)
+                    loadFut.get();
+
                 final Collection<KeyCacheObject> enlisted = Collections.singleton(cacheKey);
 
                 if (log.isDebugEnabled())
@@ -3124,6 +3127,15 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
             if (pessimistic()) {
                 assert loadFut == null || loadFut.isDone() : loadFut;
 
+                if (loadFut != null) {
+                    try {
+                        loadFut.get();
+                    }
+                    catch (IgniteCheckedException e) {
+                        return new GridFinishedFuture(e);
+                    }
+                }
+
                 if (log.isDebugEnabled())
                     log.debug("Before acquiring transaction lock for put on keys: " + enlisted);
 
@@ -3382,7 +3394,16 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         // Otherwise, during rollback we will not know whether locks need
         // to be rolled back.
         if (pessimistic()) {
-            assert loadFut.isDone() : loadFut;
+            assert loadFut == null || loadFut.isDone() : loadFut;
+
+            if (loadFut != null) {
+                try {
+                    loadFut.get();
+                }
+                catch (IgniteCheckedException e) {
+                    return new GridFinishedFuture<>(e);
+                }
+            }
 
             if (log.isDebugEnabled())
                 log.debug("Before acquiring transaction lock for remove on keys: " + enlisted);


Mime
View raw message