tkalkirill commented on code in PR #1578:
URL: https://github.com/apache/ignite-3/pull/1578#discussion_r1088181306
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/AbstractPageMemoryTableStorage.java:
##########
@@ -412,6 +412,35 @@ public CompletableFuture<Void> finishRebalancePartition(
});
}
+ @Override
+ public CompletableFuture<Void> clearPartition(int partitionId) {
+ return inBusyLock(busyLock, () -> {
+ AbstractPageMemoryMvPartitionStorage mvPartitionStorage =
getMvPartitionBusy(partitionId);
+
+ if (mvPartitionStorage == null) {
+ throw new
StorageException(createMissingMvPartitionErrorMessage(partitionId));
+ }
+
+ try {
+ mvPartitionStorage.startCleanup();
+
+ return clearStorageAndUpdateDataStructures(mvPartitionStorage)
+ .whenComplete((unused, throwable) ->
mvPartitionStorage.finishCleanup());
+ } catch (StorageException e) {
+ mvPartitionStorage.finishCleanup();
+
+ throw e;
+ } catch (Exception e) {
Review Comment:
Fix it
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]