You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/01/11 13:40:18 UTC

[GitHub] asfgit closed pull request #5733: IGNITE-10794: MVCC: Fix mvcc RemoveAll.

asfgit closed pull request #5733: IGNITE-10794: MVCC: Fix mvcc RemoveAll.
URL: https://github.com/apache/ignite/pull/5733
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 899417d7cf59..368e5c451126 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1263,7 +1263,7 @@ else if (res.resultType() == ResultType.REMOVED_NOT_NULL) {
 
         updRes.newValue(res.newValue());
 
-        if (invoke) {
+        if (invoke && res.resultType() != ResultType.VERSION_FOUND) {
             assert res.invokeResult() != null;
 
             updRes.invokeResult(res.invokeResult());
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
index 28647124acc5..aee6a8f22661 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java
@@ -1144,16 +1144,25 @@ public void add(KeyCacheObject key, Message val) {
             if (keys == null)
                 keys = new ArrayList<>();
 
-            keys.add(key);
+            if (vals == null && val != null) {
+                if (keys.isEmpty())
+                    vals = new ArrayList<>();
+                else { // Init vals with missed 'nulls'.
+                    assert !(val instanceof GridInvokeValue);
 
-            if (val != null) {
-                if (vals == null)
                     vals = new ArrayList<>();
 
-                vals.add(val);
+                    ((ArrayList<Message>)vals).ensureCapacity(keys.size() + 1);
+
+                    for (int i = 0; i < keys.size(); i++)
+                        vals.add(null);
+                }
             }
 
-            assert (vals == null) || keys.size() == vals.size();
+            keys.add(key);
+
+            if (vals != null)
+                vals.add(val);
         }
 
         /**
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 319073ba7fbb..54c72b3c146e 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
@@ -1916,7 +1916,7 @@ public void mvccEnlistBatch(GridDhtTxRemote tx, GridCacheContext ctx, EnlistOper
                             invokeArgs = invokeVal.invokeArgs();
                         }
 
-                        assert entryProc != null || !op.isInvoke() : "entryProc=" + entryProc + ", op=" + op;
+                        assert entries != null || entryProc != null || !op.isInvoke() : "entryProc=" + entryProc + ", op=" + op;
 
                         GridDhtCacheEntry entry = dht.entryExx(key, tx.topologyVersion());
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java
index 1f144f05b529..7bccecf8f84f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReferenceCleanupSelfTest.java
@@ -77,9 +77,6 @@
     /** @throws Exception If failed. */
     @Test
     public void testAtomicLongPartitioned() throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
-
         mode = CacheMode.PARTITIONED;
 
         startGrids(2);
@@ -95,9 +92,6 @@ public void testAtomicLongPartitioned() throws Exception {
     /** @throws Exception If failed. */
     @Test
     public void testAtomicLongReplicated() throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
-
         mode = CacheMode.REPLICATED;
 
         startGrids(2);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
index d3c71905e3ab..a86c9b3cd53f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryProcessorNodeJoinTest.java
@@ -40,7 +40,6 @@
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.GridTestUtils.SF;
-import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
 import org.junit.Test;
@@ -138,9 +137,6 @@ public void testAllEntryProcessorNodeJoin() throws Exception {
      */
     @Test
     public void testEntryProcessorNodeLeave() throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10254");
-
         startGrid(GRID_CNT);
 
         // TODO: IGNITE-1525 (test fails with one-phase commit).
@@ -212,9 +208,6 @@ public void testEntryProcessorNodeLeave() throws Exception {
      * @throws Exception If failed.
      */
     private void checkEntryProcessorNodeJoin(boolean invokeAll) throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
-
         final AtomicBoolean stop = new AtomicBoolean();
         final AtomicReference<Throwable> error = new AtomicReference<>();
         final int started = 6;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
index 30b1dda6d058..296e5efee20e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
@@ -2100,7 +2100,7 @@ public void testServiceReassign() throws Exception {
     @Test
     public void testNoForceKeysRequests() throws Exception {
         if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
+            fail("https://issues.apache.org/jira/browse/IGNITE-10604");
 
         cacheC = new IgniteClosure<String, CacheConfiguration[]>() {
             @Override public CacheConfiguration[] apply(String s) {
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java
index c9f903e517d2..26a04afc3332 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPreloadAbstractTest.java
@@ -84,9 +84,6 @@
      */
     @Test
     public void testRemoteTxPreloading() throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
-
         IgniteCache<String, Integer> cache = jcache(0);
 
         for (int i = 0; i < 10_000; i++)
@@ -166,9 +163,6 @@ public void testLocalTxPreloadingOptimistic() throws Exception {
      */
     @Test
     public void testLocalTxPreloadingPessimistic() throws Exception {
-        if (MvccFeatureChecker.forcedMvcc())
-            fail("https://issues.apache.org/jira/browse/IGNITE-10391");
-
         testLocalTxPreloading(PESSIMISTIC);
     }
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java
index f342d4c9d443..ac28128223ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java
@@ -50,10 +50,4 @@
     @Override public void testBackupQueueEvict() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-7311");
     }
-
-    /** {@inheritDoc} */
-    @Test
-    @Override public void testFailoverStartStopBackup() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-10391");
-    }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java
index b9972ee785cb..68bf1468a103 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverMvccTxSelfTest.java
@@ -45,10 +45,4 @@
     @Override public void testBackupQueueEvict() throws Exception {
         fail("https://issues.apache.org/jira/browse/IGNITE-7311");
     }
-
-    /** {@inheritDoc} */
-    @Test
-    @Override public void testFailoverStartStopBackup() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-10391");
-    }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services