This is an automated email from the ASF dual-hosted git repository.
gvvinblade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new f6c84a2 IGNITE-10794: MVCC: RemoveAll is broken on unstable topology.
This closes #5733.
f6c84a2 is described below
commit f6c84a21ef353c3400ac5225683b07f84ef06b7e
Author: Igor Seliverstov <[email protected]>
AuthorDate: Fri Jan 11 16:36:25 2019 +0300
IGNITE-10794: MVCC: RemoveAll is broken on unstable topology. This closes
#5733.
---
.../internal/processors/cache/GridCacheMapEntry.java | 2 +-
.../distributed/dht/GridDhtTxAbstractEnlistFuture.java | 15 ++++++++-------
.../processors/cache/transactions/IgniteTxHandler.java | 2 +-
.../cache/GridCacheReferenceCleanupSelfTest.java | 6 ------
.../cache/IgniteCacheEntryProcessorNodeJoinTest.java | 7 -------
.../distributed/CacheLateAffinityAssignmentTest.java | 2 +-
.../cache/distributed/IgniteTxPreloadAbstractTest.java | 6 ------
.../CacheContinuousQueryAsyncFailoverMvccTxSelfTest.java | 6 ------
.../CacheContinuousQueryFailoverMvccTxSelfTest.java | 6 ------
9 files changed, 11 insertions(+), 41 deletions(-)
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 899417d..368e5c4 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 @@ public abstract class GridCacheMapEntry extends
GridMetadataAwareAdapter impleme
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 936758d..7b9c29c 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
@@ -1146,16 +1146,17 @@ public abstract class GridDhtTxAbstractEnlistFuture<T>
extends GridCacheFutureAd
if (keys == null)
keys = new ArrayList<>();
- keys.add(key);
-
- if (val != null) {
- if (vals == null)
- vals = new ArrayList<>();
+ if (vals == null && val != null) {
+ vals = new ArrayList<>(U.ceilPow2(keys.size() + 1));
- vals.add(val);
+ while (vals.size() != keys.size())
+ vals.add(null); // Init vals with missed 'nulls'.
}
- 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 a9e6e47..9b9c7cc 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
@@ -1904,7 +1904,7 @@ public class IgniteTxHandler {
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 1f144f0..7bccecf 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 @@ public class GridCacheReferenceCleanupSelfTest extends
GridCommonAbstractTest {
/** @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 class GridCacheReferenceCleanupSelfTest extends
GridCommonAbstractTest {
/** @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 d3c7190..a86c9b3 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.internal.util.typedef.internal.U;
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 class IgniteCacheEntryProcessorNodeJoinTest extends
GridCommonAbstractTes
*/
@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 class IgniteCacheEntryProcessorNodeJoinTest extends
GridCommonAbstractTes
* @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 30b1dda..296e5ef 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 class CacheLateAffinityAssignmentTest extends
GridCommonAbstractTest {
@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 c9f903e..26a04af 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 @@ public abstract class IgniteTxPreloadAbstractTest extends
GridCacheAbstractSelfT
*/
@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 abstract class IgniteTxPreloadAbstractTest extends
GridCacheAbstractSelfT
*/
@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 f342d4c..ac28128 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 @@ public class CacheContinuousQueryAsyncFailoverMvccTxSelfTest
extends CacheConti
@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 b9972ee..68bf146 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 @@ public class CacheContinuousQueryFailoverMvccTxSelfTest
extends CacheContinuousQ
@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");
- }
}