You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by tk...@apache.org on 2025/08/21 05:27:53 UTC
(ignite-3) branch ignite-26255 created (now dca301e3d08)
This is an automated email from the ASF dual-hosted git repository.
tkalkirill pushed a change to branch ignite-26255
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
at dca301e3d08 IGNITE-26255 wip
This branch includes the following new commits:
new dca301e3d08 IGNITE-26255 wip
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(ignite-3) 01/01: IGNITE-26255 wip
Posted by tk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tkalkirill pushed a commit to branch ignite-26255
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit dca301e3d08d28945b25aae005778e043d633196
Author: Kirill Tkalenko <tk...@yandex.ru>
AuthorDate: Thu Aug 21 08:27:35 2025 +0300
IGNITE-26255 wip
---
.../PersistentPageMemoryMvTableStorageTest.java | 96 ++++++++++++++++++++++
1 file changed, 96 insertions(+)
diff --git a/modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryMvTableStorageTest.java b/modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryMvTableStorageTest.java
index 66b6c9b371a..2eab623fa0f 100644
--- a/modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryMvTableStorageTest.java
+++ b/modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryMvTableStorageTest.java
@@ -23,6 +23,7 @@ import static org.apache.ignite.internal.pagememory.persistence.checkpoint.Check
import static org.apache.ignite.internal.storage.pagememory.PersistentPageMemoryStorageEngine.ENGINE_NAME;
import static org.apache.ignite.internal.testframework.IgniteTestUtils.runRace;
import static org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willCompleteSuccessfully;
+import static org.apache.ignite.internal.util.ArrayUtils.BYTE_EMPTY_ARRAY;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.equalTo;
@@ -33,6 +34,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.Mockito.mock;
import java.nio.file.Path;
+import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import org.apache.ignite.internal.components.LogSyncer;
import org.apache.ignite.internal.configuration.testframework.InjectConfiguration;
@@ -49,6 +51,7 @@ import org.apache.ignite.internal.storage.MvPartitionStorage;
import org.apache.ignite.internal.storage.RowId;
import org.apache.ignite.internal.storage.configurations.StorageConfiguration;
import org.apache.ignite.internal.storage.configurations.StorageProfileConfiguration;
+import org.apache.ignite.internal.storage.engine.MvPartitionMeta;
import org.apache.ignite.internal.storage.engine.MvTableStorage;
import org.apache.ignite.internal.storage.engine.StorageTableDescriptor;
import org.apache.ignite.internal.storage.pagememory.configuration.schema.PersistentPageMemoryProfileConfiguration;
@@ -61,6 +64,7 @@ import org.apache.ignite.internal.util.Constants;
import org.apache.ignite.internal.util.IgniteUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
@@ -268,4 +272,96 @@ public class PersistentPageMemoryMvTableStorageTest extends AbstractMvTableStora
return null;
});
}
+
+ @Disabled("https://issues.apache.org/jira/browse/IGNITE-26233")
+ @Test
+ void createMvPartitionStorageAndDoCheckpointInParallel() {
+ for (int i = 0; i < 10; i++) {
+ runRace(
+ () -> getOrCreateMvPartition(PARTITION_ID),
+ () -> assertThat(forceCheckpointAsync(), willCompleteSuccessfully())
+ );
+
+ assertThat(tableStorage.destroyPartition(PARTITION_ID), willCompleteSuccessfully());
+ }
+ }
+
+ @Disabled("https://issues.apache.org/jira/browse/IGNITE-26233")
+ @Test
+ void clearMvPartitionStorageAndDoCheckpointInParallel() {
+ for (int i = 0; i < 10; i++) {
+ getOrCreateMvPartition(PARTITION_ID);
+
+ runRace(
+ () -> assertThat(tableStorage.clearPartition(PARTITION_ID), willCompleteSuccessfully()),
+ () -> assertThat(forceCheckpointAsync(), willCompleteSuccessfully())
+ );
+
+ assertThat(tableStorage.destroyPartition(PARTITION_ID), willCompleteSuccessfully());
+ }
+ }
+
+ @Disabled("https://issues.apache.org/jira/browse/IGNITE-26233")
+ @Test
+ void destroyMvPartitionStorageAndDoCheckpointInParallel() {
+ for (int i = 0; i < 10; i++) {
+ getOrCreateMvPartition(PARTITION_ID);
+
+ runRace(
+ () -> assertThat(tableStorage.destroyPartition(PARTITION_ID), willCompleteSuccessfully()),
+ () -> assertThat(forceCheckpointAsync(), willCompleteSuccessfully())
+ );
+ }
+ }
+
+ @Disabled("https://issues.apache.org/jira/browse/IGNITE-26233")
+ @Test
+ void startRebalancePartitionAndDoCheckpointInParallel() {
+ getOrCreateMvPartition(PARTITION_ID);
+
+ for (int i = 0; i < 10; i++) {
+ runRace(
+ () -> assertThat(tableStorage.startRebalancePartition(PARTITION_ID), willCompleteSuccessfully()),
+ () -> assertThat(forceCheckpointAsync(), willCompleteSuccessfully())
+ );
+
+ assertThat(tableStorage.abortRebalancePartition(PARTITION_ID), willCompleteSuccessfully());
+ }
+ }
+
+ @Disabled("https://issues.apache.org/jira/browse/IGNITE-26233")
+ @Test
+ void abortRebalancePartitionAndDoCheckpointInParallel() {
+ getOrCreateMvPartition(PARTITION_ID);
+
+ for (int i = 0; i < 10; i++) {
+ assertThat(tableStorage.startRebalancePartition(PARTITION_ID), willCompleteSuccessfully());
+
+ runRace(
+ () -> assertThat(tableStorage.abortRebalancePartition(PARTITION_ID), willCompleteSuccessfully()),
+ () -> assertThat(forceCheckpointAsync(), willCompleteSuccessfully())
+ );
+ }
+ }
+
+ @Disabled("https://issues.apache.org/jira/browse/IGNITE-26233")
+ @Test
+ void finishRebalancePartitionAndDoCheckpointInParallel() {
+ getOrCreateMvPartition(PARTITION_ID);
+
+ for (int i = 0; i < 10; i++) {
+ assertThat(tableStorage.startRebalancePartition(PARTITION_ID), willCompleteSuccessfully());
+
+ var meta = new MvPartitionMeta(1, 1, BYTE_EMPTY_ARRAY, null, BYTE_EMPTY_ARRAY);
+
+ runRace(
+ () -> assertThat(tableStorage.finishRebalancePartition(PARTITION_ID, meta), willCompleteSuccessfully()),
+ () -> assertThat(forceCheckpointAsync(), willCompleteSuccessfully())
+ );
+ }
+ }
+
+ private CompletableFuture<Void> forceCheckpointAsync() {
+ return engine.checkpointManager().forceCheckpoint("test").futureFor(FINISHED);
+ }
}