ibessonov commented on code in PR #1213:
URL: https://github.com/apache/ignite-3/pull/1213#discussion_r997102994
##########
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:
I think we should also mention that failure handler must be invoked in
situation like this. `runConsistently` by itself doesn't guarantee that data
won't end up on disk
--
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]