ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/50] incubator-ignite git commit: # ignite-157-1
Date Wed, 29 Apr 2015 15:34:49 GMT
# ignite-157-1


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

Branch: refs/heads/ignite-695
Commit: 0f33ab0e9c19e964a470de5444df7b59d3162e58
Parents: 5443383
Author: sboikov <semen.boikov@inria.fr>
Authored: Sun Apr 26 20:35:10 2015 +0300
Committer: sboikov <semen.boikov@inria.fr>
Committed: Sun Apr 26 20:35:10 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/distributed/dht/GridDhtTxRemote.java     | 7 +++++++
 .../processors/cache/transactions/IgniteTxHandler.java        | 2 ++
 .../processors/cache/transactions/IgniteTxManager.java        | 4 ++--
 3 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0f33ab0e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
index 2673ed5..30464a5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
@@ -178,6 +178,13 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
         topologyVersion(topVer);
     }
 
+    /**
+     * @param txNodes Transaction nodes.
+     */
+    public void transactionNodes(Map<UUID, Collection<UUID>> txNodes) {
+        this.txNodes = txNodes;
+    }
+
     /** {@inheritDoc} */
     @Override public boolean dht() {
         return true;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0f33ab0e/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 b2abe49..6b45fee 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
@@ -1035,6 +1035,8 @@ public class IgniteTxHandler {
                     return null;
                 }
             }
+            else
+                tx.transactionNodes(req.transactionNodes());
 
             if (!tx.isSystemInvalidate() && !F.isEmpty(req.writes())) {
                 int idx = 0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0f33ab0e/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 f4c138c..c494602 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
@@ -2062,7 +2062,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
                     else {
                         // Check prepare only if originating node ID failed. Otherwise parent
node will finish this tx.
                         if (tx.originatingNodeId().equals(evtNodeId)) {
-                            if (tx.optimistic() && tx.state() == PREPARED)
+                            if (tx.state() == PREPARED)
                                 commitIfPrepared(tx);
                             else {
                                 IgniteInternalFuture<IgniteInternalTx> prepFut = tx.currentPrepareFuture();
@@ -2070,7 +2070,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
                                 if (prepFut != null) {
                                     prepFut.listen(new CI1<IgniteInternalFuture<IgniteInternalTx>>()
{
                                         @Override public void apply(IgniteInternalFuture<IgniteInternalTx>
fut) {
-                                            if (tx.optimistic() && tx.state() ==
PREPARED)
+                                            if (tx.state() == PREPARED)
                                                 commitIfPrepared(tx);
                                             else if (tx.setRollbackOnly())
                                                 tx.rollbackAsync();


Mime
View raw message