tkalkirill commented on code in PR #920:
URL: https://github.com/apache/ignite-3/pull/920#discussion_r922198393


##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/checkpoint/CheckpointPagesWriter.java:
##########
@@ -212,4 +241,53 @@ public void writePage(FullPageId fullPageId, ByteBuffer 
buf, int tag) throws Ign
             }
         };
     }
+
+    /**
+     * Updates the partition {@link PartitionMetaIo} (pageIdx == 0).
+     *
+     * @throws IgniteInternalCheckedException If failed.
+     */
+    private void updatePartitions() throws IgniteInternalCheckedException {
+        Result<PersistentPageMemory, GroupPartitionId> queueResult = new 
Result<>();
+
+        while (!shutdownNow.getAsBoolean() && 
updatePartitionIds.next(queueResult)) {
+            GroupPartitionId partitionId = queueResult.getValue();
+
+            PartitionFilePageStore partitionFilePageStore = 
partitionFilePageStoreManager.getStore(
+                    partitionId.getGroupId(),
+                    partitionId.getPartitionId()
+            );
+
+            ByteBuffer buffer = threadBuf.get();
+
+            PersistentPageMemory pageMemory = queueResult.getKey();
+
+            long partitionMetaPageId = 
pageMemory.partitionMetaPageId(partitionId.getGroupId(), 
partitionId.getPartitionId());
+
+            long pageAddr = GridUnsafe.bufferAddress(buffer);
+
+            // TODO: IGNITE-16657 Merger will put the page into a partition 
file.
+            PartitionMetaIo io = PartitionMetaIo.VERSIONS.latest();
+
+            io.initNewPage(pageAddr, partitionMetaPageId, buffer.capacity());
+
+            PartitionMeta meta = partitionFilePageStore.meta();
+
+            io.setTreeRootPageId(pageAddr, meta.treeRootPageId());

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]

Reply via email to