You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ip...@apache.org on 2019/06/15 16:23:55 UTC
[ignite] branch master updated: IGNITE-11908 Fix hanging
IgnitePdsCacheWalDisabledOnRebalancingTest.testRebalancedPartitionsOwningWithConcurrentAffinityChange
in case of assertion failure - Fixes #6602.
This is an automated email from the ASF dual-hosted git repository.
ipavlukhin 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 8977f0f IGNITE-11908 Fix hanging IgnitePdsCacheWalDisabledOnRebalancingTest.testRebalancedPartitionsOwningWithConcurrentAffinityChange in case of assertion failure - Fixes #6602.
8977f0f is described below
commit 8977f0f587075d8befccbac38e7b13d87f719cfa
Author: ipavlukhin <vo...@gmail.com>
AuthorDate: Sat Jun 15 19:23:23 2019 +0300
IGNITE-11908 Fix hanging IgnitePdsCacheWalDisabledOnRebalancingTest.testRebalancedPartitionsOwningWithConcurrentAffinityChange in case of assertion failure - Fixes #6602.
Signed-off-by: ipavlukhin <vo...@gmail.com>
---
...IgnitePdsCacheWalDisabledOnRebalancingTest.java | 33 +++++++++++++---------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java
index 6661f3b..b83becf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java
@@ -308,30 +308,37 @@ public class IgnitePdsCacheWalDisabledOnRebalancingTest extends GridCommonAbstra
return false;
};
+ IgniteEx ig1;
+ CacheGroupMetricsMXBean mxBean;
+ int locMovingPartsNum;
+
// Enable blocking checkpointer on node idx=1 (see BlockingCheckpointFileIOFactory).
fileIoBlockingSemaphore.drainPermits();
+ try {
+ ig1 = startGrid(1);
- IgniteEx ig1 = startGrid(1);
-
- CacheGroupMetricsMXBean mxBean = ig1.cachex(CACHE3_NAME).context().group().mxBean();
- int locMovingPartsNum = mxBean.getLocalNodeMovingPartitionsCount();
+ mxBean = ig1.cachex(CACHE3_NAME).context().group().mxBean();
+ locMovingPartsNum = mxBean.getLocalNodeMovingPartitionsCount();
- // Partitions remain in MOVING state even after PME and rebalancing when checkpointer is blocked.
- assertTrue("Expected non-zero value for local moving partitions count on node idx = 1: " +
- locMovingPartsNum, 0 < locMovingPartsNum && locMovingPartsNum < CACHE3_PARTS_NUM);
+ // Partitions remain in MOVING state even after PME and rebalancing when checkpointer is blocked.
+ assertTrue("Expected non-zero value for local moving partitions count on node idx = 1: " +
+ locMovingPartsNum, 0 < locMovingPartsNum && locMovingPartsNum < CACHE3_PARTS_NUM);
- blockRebalanceEnabled.set(true);
+ blockRebalanceEnabled.set(true);
- // Change baseline topology and release checkpointer to verify
- // that no partitions will be owned after affinity change.
- ig0.cluster().setBaselineTopology(ig1.context().discovery().topologyVersion());
- fileIoBlockingSemaphore.release(Integer.MAX_VALUE);
+ // Change baseline topology and release checkpointer to verify
+ // that no partitions will be owned after affinity change.
+ ig0.cluster().setBaselineTopology(ig1.context().discovery().topologyVersion());
+ }
+ finally {
+ fileIoBlockingSemaphore.release(Integer.MAX_VALUE);
+ }
locMovingPartsNum = mxBean.getLocalNodeMovingPartitionsCount();
assertTrue("Expected moving partitions count on node idx = 1 equals to all partitions of the cache " +
CACHE3_NAME + ": " + locMovingPartsNum, locMovingPartsNum == CACHE3_PARTS_NUM);
- TestRecordingCommunicationSpi commSpi = (TestRecordingCommunicationSpi) ig1
+ TestRecordingCommunicationSpi commSpi = (TestRecordingCommunicationSpi)ig1
.configuration().getCommunicationSpi();
// When we stop blocking demand message rebalancing should complete and all partitions should be owned.