sollhui opened a new pull request, #68304: URL: https://github.com/apache/doris/pull/68304
### What problem does this PR solve? MoW row-key lookup can load large primary-key index root pages even when the target key is absent. Long VARCHAR primary keys make this especially expensive: key bounds may select many segments, and the previous code loaded their PK indexes before consulting their Bloom filters. This change avoids unnecessary loading at two levels: - `BaseTablet::lookup_row_key` no longer eagerly initializes PK indexes and Bloom filters for every segment in a candidate rowset. Only segments actually visited by lookup initialize them. - `Segment::lookup_row_key` checks the Bloom filter first. A negative result returns `KEY_NOT_FOUND` without loading the PK index; a possible match still performs the existing exact lookup. Picked from https://github.com/selectdb/selectdb-core/pull/12038. ### Release note Reduce unnecessary primary-key index loading during MoW row-key lookup, including lookups rejected by Bloom filters. ### Check List (For Author) - Test: Not run (cherry-pick only, per request). - Behavior changed: Yes. PK indexes are initialized only for visited segments whose Bloom filters do not reject the lookup key. - Does this need documentation: No. No configuration or storage-format change. -- 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]
