mike-tr-adamson commented on code in PR #2943:
URL: https://github.com/apache/cassandra/pull/2943#discussion_r1410886847
##########
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:
Correct. It's just an optimisation on the off chance that this is the case.
--
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]