ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-6181
Date Thu, 21 Sep 2017 08:26:20 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-6181-2 e6f60c90b -> f4a30e400


ignite-6181


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

Branch: refs/heads/ignite-6181-2
Commit: f4a30e4007e4979af8f139eb61356a156f743fd2
Parents: e6f60c9
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Sep 21 11:26:13 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Sep 21 11:26:13 2017 +0300

----------------------------------------------------------------------
 .../cache/transactions/IgniteTxHandler.java     | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f4a30e40/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index b60bab5..38c877b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@ -957,28 +957,30 @@ public class IgniteTxHandler {
             }
         }
         catch (Throwable e) {
-            tx.commitError(e);
+            U.error(log, "Failed completing transaction [commit=" + req.commit() + ", tx="
+ tx + ']', e);
 
-            tx.systemInvalidate(true);
+            if (tx != null) {
+                tx.commitError(e);
 
-            U.error(log, "Failed completing transaction [commit=" + req.commit() + ", tx="
+ tx + ']', e);
+                tx.systemInvalidate(true);
 
-            IgniteInternalFuture<IgniteInternalTx> res = null;
+                try {
+                    IgniteInternalFuture<IgniteInternalTx> res = tx.rollbackDhtLocalAsync();
 
-            try {
-                res = tx.rollbackDhtLocalAsync();
+                    // Only for error logging.
+                    res.listen(CU.errorLogger(log));
 
-                // Only for error logging.
-                res.listen(CU.errorLogger(log));
-            }
-            catch (Throwable e1) {
-                e.addSuppressed(e1);
+                    return res;
+                }
+                catch (Throwable e1) {
+                    e.addSuppressed(e1);
+                }
             }
 
             if (e instanceof Error)
                 throw (Error)e;
 
-            return res;
+            return new GridFinishedFuture<>(e);
         }
     }
 


Mime
View raw message