tkalkirill commented on code in PR #901:
URL: https://github.com/apache/ignite-3/pull/901#discussion_r933003476
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointManager.java:
##########
@@ -221,4 +233,56 @@ static boolean safeToUpdateAllPageMemories(Collection<?
extends DataRegion<Persi
return true;
}
+
+ /**
+ * Writes a page to delta file page store.
+ *
+ * <p>Must be used at breakpoint and page replacement.
+ *
+ * @param pageMemory Page memory.
+ * @param pageId Page ID.
+ * @param pageBuf Page buffer to write from.
+ * @param calculateCrc If {@code false} crc calculation will be forcibly
skipped.
+ * @throws IgniteInternalCheckedException If page writing failed (IO error
occurred).
+ */
+ public void writePageToDeltaFilePageStore(
+ PersistentPageMemory pageMemory,
+ FullPageId pageId,
+ ByteBuffer pageBuf,
+ boolean calculateCrc
+ ) throws IgniteInternalCheckedException {
+ FilePageStore filePageStore =
filePageStoreManager.getStore(pageId.groupId(), pageId.partitionId());
+
+ CheckpointProgress lastCheckpointProgress = lastCheckpointProgress();
+
+ assert lastCheckpointProgress != null : "Checkpoint has not happened
yet";
+ assert lastCheckpointProgress.inProgress() : "Checkpoint must be in
progress";
+
+ CheckpointDirtyPages pagesToWrite =
lastCheckpointProgress.pagesToWrite();
+
+ assert pagesToWrite != null : "Dirty pages must be sorted out";
+
+ CompletableFuture<DeltaFilePageStoreIo> deltaFilePageStoreFuture =
filePageStore.getOrCreateNewDeltaFile(
Review Comment:
Discussed personally, leave as is.
--
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]