ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [26/28] ignite git commit: ignite-4371
Date Thu, 08 Dec 2016 13:17:11 GMT
ignite-4371


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

Branch: refs/heads/ignite-4371
Commit: daaf33064e3834d82932c381085b363f7db6d128
Parents: 54d7cea
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Dec 8 16:11:46 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Dec 8 16:11:46 2016 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtTxLocal.java   | 13 ++++++++++++
 .../near/GridNearTxFinishFuture.java            | 21 +-------------------
 .../cache/transactions/IgniteTxManager.java     |  2 --
 3 files changed, 14 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/daaf3306/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
index 6e1fae5..0b00225 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@ -514,6 +514,19 @@ public class GridDhtTxLocal extends GridDhtTxLocalAdapter implements
GridCacheMa
 
         IgniteCheckedException err = null;
 
+        if (!commit && prepFut != null) {
+            try {
+                prepFut.get();
+            }
+            catch (IgniteCheckedException e) {
+                if (log.isDebugEnabled())
+                    log.debug("Failed to prepare transaction [tx=" + this + ", e=" + e +
']');
+            }
+            finally {
+                prepFut = null;
+            }
+        }
+
         try {
             if (prepFut != null)
                 prepFut.get(); // Check for errors.

http://git-wip-us.apache.org/repos/asf/ignite/blob/daaf3306/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index f14d747..bc6942c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -299,26 +299,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
             if (err != null) {
                 tx.commitError(err);
 
-                boolean marked = tx.setRollbackOnly();
-
-                if (err instanceof IgniteTxRollbackCheckedException) {
-                    if (marked) {
-                        try {
-                            tx.rollback();
-                        }
-                        catch (IgniteCheckedException ex) {
-                            U.error(log, "Failed to automatically rollback transaction: "
+ tx, ex);
-                        }
-                    }
-                }
-                else if (tx.implicit() && tx.isSystemInvalidate()) { // Finish implicit
transaction on heuristic error.
-                    try {
-                        tx.close();
-                    }
-                    catch (IgniteCheckedException ex) {
-                        U.error(log, "Failed to invalidate transaction: " + tx, ex);
-                    }
-                }
+                tx.setRollbackOnly();
             }
 
             if (commit && tx.commitError() != null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/daaf3306/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index a19a230..36f3c84 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -1198,8 +1198,6 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
         assert tx.state() == COMMITTING : "Invalid transaction state for commit from tm [state="
+ tx.state() +
             ", expected=COMMITTING, tx=" + tx + ']';
 
-        log.info("commit " + tx.getClass().getSimpleName());
-
         if (log.isDebugEnabled())
             log.debug("Committing from TM [locNodeId=" + cctx.localNodeId() + ", tx=" + tx
+ ']');
 


Mime
View raw message