tkalkirill commented on code in PR #1161: URL: https://github.com/apache/ignite-3/pull/1161#discussion_r994576626
########## modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/hash/io/HashIndexTreeIo.java: ########## @@ -166,23 +227,51 @@ default HashIndexRow getRow(DataPageReader dataPageReader, int partitionId, long throws IgniteInternalCheckedException { int off = offset(idx); - int hash = getInt(pageAddr, off + INDEX_COLUMNS_HASH_OFFSET); + int hash = getInt(pageAddr, off); + off += Integer.BYTES; + + short indexColumnsSize = getShort(pageAddr, off); + off += Short.BYTES; + + ByteBuffer indexColumnsBuffer; + + long link; - long link = readPartitionless(partitionId, pageAddr, off + INDEX_COLUMNS_LINK_OFFSET); + if (indexColumnsSize < 0) { + indexColumnsBuffer = ByteBuffer.wrap(getBytes(pageAddr, off, -indexColumnsSize)); + off += -indexColumnsSize; Review Comment: fix it ########## modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/hash/io/HashIndexTreeIo.java: ########## @@ -90,16 +101,40 @@ default void store(long dstPageAddr, int dstIdx, BplusIo<HashIndexRowKey> srcIo, default void storeByOffset(long pageAddr, int off, HashIndexRowKey rowKey) { assert rowKey instanceof HashIndexRow; - HashIndexRow hashIndexRow = (HashIndexRow) rowKey; + HashIndexRow row = (HashIndexRow) rowKey; + + putInt(pageAddr, off, row.indexColumnsHash()); + off += Integer.BYTES; + + IndexColumns indexColumns = row.indexColumns(); + + if (isFullyInlined(indexColumns.valueSize(), indexColumnsInlineSize())) { + assert indexColumns.link() == NULL_LINK : "Index columns are completely inline, they should not be in FreeList"; - putInt(pageAddr, off + INDEX_COLUMNS_HASH_OFFSET, hashIndexRow.indexColumnsHash()); + putShort(pageAddr, off, (short) -indexColumns.valueSize()); + off += Short.BYTES; - writePartitionless(pageAddr + off + INDEX_COLUMNS_LINK_OFFSET, hashIndexRow.indexColumns().link()); + putByteBuffer(pageAddr, off, indexColumns.valueBuffer().rewind()); - RowId rowId = hashIndexRow.rowId(); + off += indexColumns.valueSize(); 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org