tkalkirill commented on code in PR #1673:
URL: https://github.com/apache/ignite-3/pull/1673#discussion_r1111511473
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryTableStorage.java:
##########
@@ -374,6 +379,53 @@ private IndexMetaTree createIndexMetaTree(
}
}
+ /**
+ * Returns new {@link GarbageCollectionTree} instance for partition.
+ *
+ * @param tableView Table configuration.
+ * @param partitionId Partition ID.
+ * @param reuseList Reuse list.
+ * @param pageMemory Persistent page memory instance.
+ * @param meta Partition metadata.
+ * @throws StorageException If failed.
+ */
+ private GarbageCollectionTree createGarbageCollectionTree(
+ TableView tableView,
+ int partitionId,
+ ReuseList reuseList,
+ PersistentPageMemory pageMemory,
+ PartitionMeta meta
+ ) {
+ try {
+ boolean initNew = false;
+
+ if (meta.garbageCollectionTreeMetaPageId() == 0) {
+ long rootPageId = pageMemory.allocatePage(tableView.tableId(),
partitionId, FLAG_AUX);
+
+ meta.garbageCollectionTreeMetaPageId(lastCheckpointId(),
rootPageId);
+
+ initNew = true;
+ }
+
+ return new GarbageCollectionTree(
+ tableView.tableId(),
+ tableView.name(),
+ partitionId,
+ dataRegion.pageMemory(),
+ PageLockListenerNoOp.INSTANCE,
+ new AtomicLong(),
+ meta.garbageCollectionTreeMetaPageId(),
+ reuseList,
+ initNew
+ );
+ } catch (IgniteInternalCheckedException e) {
Review Comment:
`org.apache.ignite.internal.storage.StorageException` is in module
`ignite-storage-api` and `org.apache.ignite.internal.pagememory.tree.BplusTree`
is in module `ignite-page-memory`, we can't just change that.
--
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]