tkalkirill commented on code in PR #1213:
URL: https://github.com/apache/ignite-3/pull/1213#discussion_r997084449
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/sorted/SortedIndexTree.java:
##########
@@ -67,18 +74,29 @@ public SortedIndexTree(
AtomicLong globalRmvId,
long metaPageId,
@Nullable ReuseList reuseList,
- boolean initNew,
- BinaryTupleComparator binaryTupleComparator
+ SortedIndexDescriptor indexDescriptor,
+ boolean initNew
) throws IgniteInternalCheckedException {
super("SortedIndexTree_" + grpId, grpId, grpName, partId, pageMem,
lockLsnr, globalRmvId, metaPageId, reuseList);
- setIos(SortedIndexTreeInnerIo.VERSIONS,
SortedIndexTreeLeafIo.VERSIONS, SortedIndexTreeMetaIo.VERSIONS);
+ inlineSize = initNew ? InlineUtils.binaryTupleInlineSize(pageSize(),
ITEM_SIZE_WITHOUT_COLUMNS, indexDescriptor)
+ : readInlineSizeFromMetaIo();
+
+ setIos(
+ SortedIndexTreeInnerIo.VERSIONS.get(inlineSize),
+ SortedIndexTreeLeafIo.VERSIONS.get(inlineSize),
+ SortedIndexTreeMetaIo.VERSIONS
+ );
dataPageReader = new DataPageReader(pageMem, grpId,
statisticsHolder());
- this.binaryTupleComparator = binaryTupleComparator;
+ binaryTupleComparator = new BinaryTupleComparator(indexDescriptor);
initTree(initNew);
+
+ if (initNew) {
+ writeInlineSizeToMetaIo(inlineSize);
Review Comment:
We will not save anything since the creation of indexes will be inside
**MvPartitionStorage#runConsistently** i.e. checkpoint lock.
--
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]