rpuch commented on code in PR #814:
URL: https://github.com/apache/ignite-3/pull/814#discussion_r878034268
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/io/AbstractDataPageIo.java:
##########
@@ -673,6 +737,18 @@ public DataPagePayload readPayload(final long pageAddr,
final int itemId, final
nextLink);
}
+ /**
+ * Returns {@code true} iff an item with given ID exists in a page at the
given address.
+ *
+ * @param pageAddr address where page data begins in memory
+ * @param itemId item ID to check
+ * @param pageSize size of the page in bytes
+ * @return {@code true} iff an item with given ID exists in a page at the
given address
+ */
+ public boolean itemExists(long pageAddr, int itemId, final int pageSize) {
Review Comment:
We discussed this, you suggested to add the following validation: 'if this
is a direct itemId, but some indirect itemId references it, we should treat
this itemId as non-existent'. This is enforced by the following line:
if (anyIndirectItemPointsAtDirectItem(pageAddr, itemId, directCnt,
indirectCnt)) {
Is this what you mention in your comment now? If not, let's discuss it
deeper.
--
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]