ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [20/21] ignite git commit: ignite-1607 WIP
Date Tue, 13 Oct 2015 07:05:53 GMT
ignite-1607 WIP


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

Branch: refs/heads/ignite-1607
Commit: 5b132805ce56e1812cb63be0a33714e5d5e0ea00
Parents: 0d68e9d
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Oct 13 09:57:25 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Oct 13 09:57:25 2015 +0300

----------------------------------------------------------------------
 .../GridNearOptimisticSerializableTxPrepareFuture.java |  8 +++++++-
 .../cache/transactions/IgniteTxLocalAdapter.java       | 13 +++++++------
 .../cache/IgniteTxMultiThreadedAbstractTest.java       |  2 +-
 .../GridCachePartitionedTxMultiThreadedSelfTest.java   |  2 --
 4 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5b132805/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index 6bd21b8..8d6042c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@ -52,6 +52,7 @@ import org.apache.ignite.internal.util.future.GridCompoundFuture;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.lang.GridPlainRunnable;
+import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.C1;
 import org.apache.ignite.internal.util.typedef.CI1;
@@ -77,6 +78,7 @@ import static org.apache.ignite.transactions.TransactionState.PREPARING;
 public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearTxPrepareFutureAdapter
     implements GridCacheMvccFuture<IgniteInternalTx> {
     /** */
+    @GridToStringExclude
     private KeyLockFuture keyLockFut = new KeyLockFuture();
 
     /** */
@@ -192,7 +194,11 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearTxPre
         if (isDone())
             return false;
 
-        this.err.compareAndSet(null, err);
+        if (err != null) {
+            this.err.compareAndSet(null, err);
+
+            keyLockFut.onDone(err);
+        }
 
         return onComplete();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5b132805/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 c6fab8a..938ed5e 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
@@ -1256,14 +1256,15 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                 commitErr.get());
         }
 
+        if (near()) {
+            // Must evict near entries before rolling back from
+            // transaction manager, so they will be removed from cache.
+            for (IgniteTxEntry e : allEntries())
+                evictNearEntry(e, false);
+        }
+
         if (doneFlag.compareAndSet(false, true)) {
             try {
-                if (near())
-                    // Must evict near entries before rolling back from
-                    // transaction manager, so they will be removed from cache.
-                    for (IgniteTxEntry e : allEntries())
-                        evictNearEntry(e, false);
-
                 cctx.tm().rollbackTx(this);
 
                 if (!internal()) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/5b132805/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
index 6372ad9..f13ba8c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiThreadedAbstractTest.java
@@ -155,7 +155,7 @@ public abstract class IgniteTxMultiThreadedAbstractTest extends IgniteTxAbstract
     /**
      * @throws IgniteCheckedException If test failed.
      */
-    public void _testOptimisticSerializableCommitMultithreaded() throws Exception {
+    public void testOptimisticSerializableCommitMultithreaded() throws Exception {
         checkCommitMultithreaded(OPTIMISTIC, SERIALIZABLE);
 
         finalChecks();

http://git-wip-us.apache.org/repos/asf/ignite/blob/5b132805/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
index abf1d6e..f76361a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
@@ -51,8 +51,6 @@ public class GridCachePartitionedTxMultiThreadedSelfTest extends IgniteTxMultiTh
         cc.setCacheMode(PARTITIONED);
         cc.setBackups(1);
 
-        cc.setNearConfiguration(null);
-
         cc.setEvictionPolicy(null);
 
         cc.setWriteSynchronizationMode(FULL_SYNC);


Mime
View raw message