spena opened a new pull request #10429: URL: https://github.com/apache/kafka/pull/10429
This iterator is similar to `RocksDBRangeIterator` except that compares key prefixes during each iteration instead of the full record key. This iterator will be used by the time-ordered window store from the PR https://github.com/apache/kafka/pull/10331. This iterator is more efficient when doing range queries. The `RocksDBPrefixRangeIterator` uses a new bytes lexico comparator that compares two bytes by their prefixes only. i.e. ``` comparator.compare(0001, 0001000F); // smallest key prefix is 4 bytes, so 0001 == 0001 comparator.compare(0001000F, 0001); // smallest key prefix is 4 bytes, so 0001 == 0001 comparator.compare(0002000F, 0001); // smallest key prefix is 4 bytes, so 0002 > 0001 comparator.compare(0001000F, 0002); // smallest key prefix is 4 bytes, so 0001 < 0002 ``` ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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. For queries about this service, please contact Infrastructure at: [email protected]
