maedhroz commented on code in PR #2943:
URL: https://github.com/apache/cassandra/pull/2943#discussion_r1409989874
##########
src/java/org/apache/cassandra/index/sai/disk/v1/keystore/KeyLookup.java:
##########
@@ -197,43 +197,34 @@ public long clusteredSeekToKey(ByteComparable key, long
startingPointId, long en
updateCurrentBlockIndex(startingPointId);
resetToCurrentBlock();
- if (compareKeys(currentKey, skipKey) == 0)
- return startingPointId;
+ // We can return straightaway if the currentPointId is within the
requested partition range and the keys match
+ if (currentPointId >= startingPointId && currentPointId <
endingPointId && compareKeys(currentKey, skipKey) == 0)
+ return currentPointId;
Review Comment:
So it is possible here that after moving to `startingPointId`'s block, we
might have a target/skip key that is the first key in the block, but we've
restricted the point ID range to start after that key's point ID?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]