tkalkirill commented on code in PR #1325:
URL: https://github.com/apache/ignite-3/pull/1325#discussion_r1031365627
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/Checkpointer.java:
##########
@@ -775,4 +799,41 @@ private void
renameDeltaFileOnCheckpointThread(GroupPartitionId partitionId) thr
void updateLastProgressAfterReleaseWriteLock() {
afterReleaseWriteLockCheckpointProgress = currentCheckpointProgress;
}
+
+ /**
+ * Callback on destruction of the partition of the corresponding group.
+ *
+ * <p>If the checkpoint is in progress, then wait until it finishes
processing the partition that we are going to destroy, in order to
+ * prevent the situation when we want to destroy the partition file along
with its delta files, and at this time the checkpoint performs
+ * I/O operations on them.
+ *
+ * @param groupId Group ID.
+ * @param partitionId Partition ID.
+ * @throws IgniteInternalCheckedException If there are errors while
processing the callback.
+ */
+ void onPartitionDestruction(int groupId, int partitionId) throws
IgniteInternalCheckedException {
+ CheckpointProgressImpl currentCheckpointProgress =
this.currentCheckpointProgress;
+
+ if (currentCheckpointProgress == null ||
!currentCheckpointProgress.inProgress()) {
+ return;
+ }
+
+ CompletableFuture<Void> processedPartitionFuture =
currentCheckpointProgress.getProcessedPartitionFuture(groupId, partitionId);
Review Comment:
Tried to 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]