tkalkirill commented on code in PR #1175:
URL: https://github.com/apache/ignite-3/pull/1175#discussion_r990058155
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/tree/io/BplusInnerIo.java:
##########
@@ -81,23 +84,24 @@ public final long getLeft(long pageAddr, int idx) {
public final void setLeft(long pageAddr, int idx, long pageId) {
assertPageType(pageAddr);
- putLong(pageAddr, offset0(idx, SHIFT_LEFT), pageId);
+ writePartitionless(pageAddr + offset0(idx, SHIFT_LEFT), link(pageId,
0));
- assert pageId == getLeft(pageAddr, idx);
+ assert pageId == getLeft(pageAddr, idx, partitionId(pageId));
}
/**
- * Returns right page id for item.
+ * Returns right page ID for item.
Review Comment:
Fix it
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/tree/io/BplusInnerIo.java:
##########
@@ -81,23 +84,24 @@ public final long getLeft(long pageAddr, int idx) {
public final void setLeft(long pageAddr, int idx, long pageId) {
assertPageType(pageAddr);
- putLong(pageAddr, offset0(idx, SHIFT_LEFT), pageId);
+ writePartitionless(pageAddr + offset0(idx, SHIFT_LEFT), link(pageId,
0));
- assert pageId == getLeft(pageAddr, idx);
+ assert pageId == getLeft(pageAddr, idx, partitionId(pageId));
}
/**
- * Returns right page id for item.
+ * Returns right page ID for item.
*
* @param pageAddr Page address.
* @param idx Index of item.
+ * @param partId Partition ID.
*/
- public final long getRight(long pageAddr, int idx) {
- return getLong(pageAddr, offset0(idx, shiftRight));
+ public final long getRight(long pageAddr, int idx, int partId) {
+ return readPartitionless(partId, pageAddr, offset0(idx, shiftRight));
}
/**
- * Returns right page id for item.
+ * Sets right page ID for item.
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]