tkalkirill commented on code in PR #6033: URL: https://github.com/apache/ignite-3/pull/6033#discussion_r2161656740
########## modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryTableStorage.java: ########## @@ -353,13 +360,45 @@ CompletableFuture<Void> clearStorageAndUpdateDataStructures(AbstractPageMemoryMv } private CompletableFuture<Void> destroyPartitionPhysically(GroupPartitionId groupPartitionId) { - dataRegion.filePageStoreManager().getStore(groupPartitionId).markToDestroy(); + FilePageStore store = dataRegion.filePageStoreManager().getStore(groupPartitionId); + + assert store != null : groupPartitionId; + + store.markToDestroy(); + + var future = new CompletableFuture<>(); + + CheckpointManager checkpointManager = dataRegion.checkpointManager(); + + CheckpointListener listener = new CheckpointListener() { Review Comment: U can use `var`. ########## modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryTableStorage.java: ########## @@ -353,13 +360,45 @@ CompletableFuture<Void> clearStorageAndUpdateDataStructures(AbstractPageMemoryMv } private CompletableFuture<Void> destroyPartitionPhysically(GroupPartitionId groupPartitionId) { - dataRegion.filePageStoreManager().getStore(groupPartitionId).markToDestroy(); + FilePageStore store = dataRegion.filePageStoreManager().getStore(groupPartitionId); + + assert store != null : groupPartitionId; + + store.markToDestroy(); + + var future = new CompletableFuture<>(); Review Comment: Lets rename to `prepareDestroyFuture`. ########## modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/mv/PersistentPageMemoryMvPartitionStorageTest.java: ########## @@ -203,4 +210,25 @@ void groupConfigShorteningWorksCorrectly() throws Exception { assertThat(readConfig, is(equalTo(configWhichFitsInOnePage))); } + + @Test + void testDeltaFileCompactionAfterPartitionRecreated() throws InterruptedException { + addWriteCommitted(new RowId(PARTITION_ID), binaryRow, clock.now()); + + assertThat(table.clearPartition(PARTITION_ID), willCompleteSuccessfully()); + + waitForDeltaFileCompaction((PersistentPageMemoryTableStorage) table); + } + + private void waitForDeltaFileCompaction(PersistentPageMemoryTableStorage tableStorage) throws InterruptedException { + PersistentPageMemoryDataRegion dataRegion = tableStorage.dataRegion(); + + CheckpointProgress checkpointProgress = engine.checkpointManager().forceCheckpoint(""); Review Comment: Please give a clearer checkpoint reason. ########## modules/storage-page-memory/src/test/java/org/apache/ignite/internal/storage/pagememory/mv/PersistentPageMemoryMvPartitionStorageTest.java: ########## @@ -203,4 +210,25 @@ void groupConfigShorteningWorksCorrectly() throws Exception { assertThat(readConfig, is(equalTo(configWhichFitsInOnePage))); } + + @Test + void testDeltaFileCompactionAfterPartitionRecreated() throws InterruptedException { Review Comment: Let's add another test with rebalance. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org