ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [39/41] ignite git commit: IGNITE-1090 - Fixed backup check for one-phase commit transaction.
Date Mon, 14 Sep 2015 23:13:20 GMT
IGNITE-1090 - Fixed backup check for one-phase commit transaction.


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

Branch: refs/heads/ignite-1400
Commit: 06fdd7d44dda36900b4c7a76dec2a7848ca9e8fb
Parents: e5f1681
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Mon Sep 14 13:35:41 2015 -0700
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Mon Sep 14 13:35:41 2015 -0700

----------------------------------------------------------------------
 .../near/GridNearTxFinishFuture.java            | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/06fdd7d4/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 ddc8be5..21aaef2 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
@@ -396,20 +396,24 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
 
                 ClusterNode backup = cctx.discovery().node(backupId);
 
-                // Nothing to do if backup has left the grid.
-                if (backup == null)
-                    return;
-
                 MiniFuture mini = new MiniFuture(backup, mapping);
 
                 add(mini);
 
-                if (backup.isLocal()) {
-                    if (cctx.tm().txHandler().checkDhtRemoteTxCommitted(tx.xidVersion()))
{
-                        readyNearMappingFromBackup(mapping);
+                // Nothing to do if backup has left the grid.
+                if (backup == null) {
+                    readyNearMappingFromBackup(mapping);
 
+                    mini.onDone(new IgniteTxRollbackCheckedException("Failed to commit transaction
" +
+                        "(backup has left grid): " + tx.xidVersion()));
+                }
+                else if (backup.isLocal()) {
+                    boolean committed = cctx.tm().txHandler().checkDhtRemoteTxCommitted(tx.xidVersion());
+
+                    readyNearMappingFromBackup(mapping);
+
+                    if (committed)
                         mini.onDone(tx);
-                    }
                     else
                         mini.onDone(new IgniteTxRollbackCheckedException("Failed to commit
transaction " +
                             "(transaction has been rolled back on backup node): " + tx.xidVersion()));


Mime
View raw message