This is an automated email from the ASF dual-hosted git repository.
sanpwc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new bf956b733e1 IGNITE-26327 Fix testDestroyPartitionStoragesOnEvictNode
and timeouts (#6573)
bf956b733e1 is described below
commit bf956b733e1603b56e92e7cb84a2e2115aa35882
Author: Cyrill <[email protected]>
AuthorDate: Wed Sep 17 12:17:38 2025 +0300
IGNITE-26327 Fix testDestroyPartitionStoragesOnEvictNode and timeouts
(#6573)
---
.../ignite/internal/rebalance/ItRebalanceDistributedTest.java | 10 ++++++----
.../ignite/internal/replicator/ZonePartitionReplicaImpl.java | 8 ++++++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git
a/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
b/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
index 00eed3de3e0..9418e41262f 100644
---
a/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
+++
b/modules/distribution-zones/src/integrationTest/java/org/apache/ignite/internal/rebalance/ItRebalanceDistributedTest.java
@@ -64,7 +64,6 @@ import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.not;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
@@ -1878,12 +1877,15 @@ public class ItRebalanceDistributedTest extends
BaseIgniteAbstractTest {
return ((TableViewInternal) table).internalTable();
}
- private static void checkInvokeDestroyedPartitionStorages(Node node,
String tableName, int partitionId) {
+ private static void checkInvokeDestroyedPartitionStorages(Node node,
String tableName, int partitionId) throws Exception {
InternalTable internalTable = getInternalTable(node, tableName);
if (colocationEnabled()) {
- // Assert that zone tx state storage was removed.
-
assertNull(node.partitionReplicaLifecycleManager.txStatePartitionStorage(internalTable.zoneId(),
partitionId));
+ // Assert that zone tx state storage was removed. Wait for the
async destroy operation to complete.
+ assertTrue(waitForCondition(
+ () ->
node.partitionReplicaLifecycleManager.txStatePartitionStorage(internalTable.zoneId(),
partitionId) == null,
+ AWAIT_TIMEOUT_MILLIS
+ ), "Zone tx state storage was not destroyed within timeout");
} else {
verify(internalTable.storage(),
timeout(AWAIT_TIMEOUT_MILLIS).atLeast(1))
.destroyPartition(partitionId);
diff --git
a/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ZonePartitionReplicaImpl.java
b/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ZonePartitionReplicaImpl.java
index 331ec86fcf3..a38711b752e 100644
---
a/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ZonePartitionReplicaImpl.java
+++
b/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ZonePartitionReplicaImpl.java
@@ -17,6 +17,8 @@
package org.apache.ignite.internal.replicator;
+import static
org.apache.ignite.internal.util.CompletableFutures.nullCompletedFuture;
+
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import org.apache.ignite.internal.network.NetworkMessage;
@@ -87,8 +89,10 @@ public class ZonePartitionReplicaImpl implements Replica {
public CompletableFuture<Void> shutdown() {
listener.onShutdown();
- return raftClient.unsubscribeLeader()
- .thenAccept(v -> raftClient.shutdown());
+ raftClient.unsubscribeLeader();
+ raftClient.shutdown();
+
+ return nullCompletedFuture();
}
@Override