ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: 12306
Date Fri, 07 Jul 2017 09:05:01 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-gg-12306-1 35d771a26 -> 3b3a5994a


12306


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

Branch: refs/heads/ignite-gg-12306-1
Commit: 3b3a5994ac342b5b7c2193378f3d7e782533c5af
Parents: 35d771a
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Jul 7 12:04:55 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Jul 7 12:04:55 2017 +0300

----------------------------------------------------------------------
 .../distributed/dht/GridDhtTxFinishFuture.java     |  3 +--
 .../distributed/near/GridNearTxFinishFuture.java   | 17 ++++++++---------
 .../cache/transactions/IgniteTxLocalAdapter.java   | 15 +++++++++------
 3 files changed, 18 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3b3a5994/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
index 775757c..5311ddc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
@@ -227,8 +227,7 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCacheCompoundIdentity
                 try {
                     boolean nodeStop = err != null && X.hasCause(err, NodeStoppingException.class);
 
-                    if (!nodeStop)
-                        this.tx.tmFinish(err == null);
+                    this.tx.tmFinish(err == null, nodeStop);
                 }
                 catch (IgniteCheckedException finishErr) {
                     U.error(log, "Failed to finish tx: " + tx, e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/3b3a5994/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 48e86c6..c45eb7b 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
@@ -323,18 +323,17 @@ public final class GridNearTxFinishFuture<K, V> extends GridCacheCompoundIdentit
                 if (tx.onePhaseCommit()) {
                     boolean commit = this.commit && err == null;
 
-                    if (!nodeStop) {
+                    if (!nodeStop)
                         finishOnePhase(commit);
 
-                        try {
-                            tx.tmFinish(commit);
-                        }
-                        catch (IgniteCheckedException e) {
-                            U.error(log, "Failed to finish tx: " + tx, e);
+                    try {
+                        tx.tmFinish(commit, nodeStop);
+                    }
+                    catch (IgniteCheckedException e) {
+                        U.error(log, "Failed to finish tx: " + tx, e);
 
-                            if (err == null)
-                                err = e;
-                        }
+                        if (err == null)
+                            err = e;
                     }
                 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/3b3a5994/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 49b67da..e7ebaae 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
@@ -898,17 +898,20 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
      * Commits transaction to transaction manager. Used for one-phase commit transactions
only.
      *
      * @param commit If {@code true} commits transaction, otherwise rollbacks.
+     * @param nodeStop If {@code true} tx is cancelled on node stop.
      * @throws IgniteCheckedException If failed.
      */
-    public void tmFinish(boolean commit) throws IgniteCheckedException {
+    public void tmFinish(boolean commit, boolean nodeStop) throws IgniteCheckedException
{
         assert onePhaseCommit();
 
         if (DONE_FLAG_UPD.compareAndSet(this, 0, 1)) {
-            // Unlock all locks.
-            if (commit)
-                cctx.tm().commitTx(this);
-            else
-                cctx.tm().rollbackTx(this);
+            if (!nodeStop) {
+                // Unlock all locks.
+                if (commit)
+                    cctx.tm().commitTx(this);
+                else
+                    cctx.tm().rollbackTx(this);
+            }
 
             state(commit ? COMMITTED : ROLLED_BACK);
 


Mime
View raw message