ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-157 wait for 'preparing' transactions in 'processCheckPreparedTxRequest'
Date Fri, 24 Apr 2015 14:17:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-157-1 26d20e724 -> 5443383c4


# ignite-157 wait for 'preparing' transactions in 'processCheckPreparedTxRequest'


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

Branch: refs/heads/ignite-157-1
Commit: 5443383c4354e0cfd82fa9d3f8e2a329ba31db21
Parents: 26d20e7
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Apr 24 17:17:13 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Apr 24 17:17:13 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/transactions/IgniteTxManager.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5443383c/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 e4cf28b..f4c138c 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
@@ -2070,7 +2070,9 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
                                 if (prepFut != null) {
                                     prepFut.listen(new CI1<IgniteInternalFuture<IgniteInternalTx>>()
{
                                         @Override public void apply(IgniteInternalFuture<IgniteInternalTx>
fut) {
-                                            if (tx.setRollbackOnly())
+                                            if (tx.optimistic() && tx.state() ==
PREPARED)
+                                                commitIfPrepared(tx);
+                                            else if (tx.setRollbackOnly())
                                                 tx.rollbackAsync();
                                         }
                                     });


Mime
View raw message