ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject incubator-ignite git commit: IGNITE-9655-Merge - Fixed group lock TX tests.
Date Sat, 14 Feb 2015 02:49:33 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-9655-merge d5dde8253 -> 25980ba4d


IGNITE-9655-Merge - Fixed group lock TX tests.


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

Branch: refs/heads/ignite-9655-merge
Commit: 25980ba4d0ffdd53073a251fd9961cc9a797b421
Parents: d5dde82
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Fri Feb 13 17:29:36 2015 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Fri Feb 13 18:49:29 2015 -0800

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtTxPrepareFuture.java          | 6 ++++--
 .../cache/distributed/near/GridNearTxPrepareFuture.java        | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/25980ba4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 4c6af2c..e30cb40 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -464,8 +464,10 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
                 txEntry.cached(entry, txEntry.keyBytes());
             }
 
-            if (tx.optimistic() && txEntry.explicitVersion() == null)
-                lockKeys.add(txEntry.txKey());
+            if (tx.optimistic() && txEntry.explicitVersion() == null) {
+                if (!tx.groupLock() || tx.groupLockKey().equals(entry.txKey()))
+                    lockKeys.add(txEntry.txKey());
+            }
 
             while (true) {
                 try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/25980ba4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
index 4dd77bd..24ef9b5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareFuture.java
@@ -802,6 +802,11 @@ public final class GridNearTxPrepareFuture<K, V> extends GridCompoundIdentityFut
         entry.nodeId(primary.id());
 
         if (cacheCtx.isNear()) {
+            if (entry.explicitVersion() == null) {
+                if (!tx.groupLock() || tx.groupLockKey().equals(entry.txKey()))
+                    lockKeys.add(entry.txKey());
+            }
+
             while (true) {
                 try {
                     GridNearCacheEntry<K, V> cached = (GridNearCacheEntry<K, V>)entry.cached();


Mime
View raw message