sollhui opened a new pull request, #69275:
URL: https://github.com/apache/doris/pull/69275

   ### What problem does this PR solve?
   
   Backport https://github.com/apache/doris/pull/68304 to `branch-4.2`.
   
   SegmentCache could retain large decompressed PK index roots while charging 
only estimated metadata. Account for those pinned roots in eviction weight at 
insertion and after deferred index initialization, without counting the same 
physical pages twice in memory tracking. Grow charges under the LRU shard lock, 
guard updates against replacement, keep the callback's cache ownership weak, 
and release partially loaded index readers on failure. Existing eager rowset 
index loading and index-before-bloom-filter lookup order are preserved.
   
   Adapt the Segment test fixture to branch-4.2's existing 
`SegmentWriterOptions` and `build_segment` helper. Retain all 7 LRU and 6 
Segment test cases from the merged source change.
   
   ### Release note
   
   Account for pinned PK index roots in SegmentCache eviction to reduce 
persistent index memory retention.
   
   ### Check List (For Author)
   
   - Test: Passed `git diff --check`, changed-line/new-file clang-format 16.0.5 
checks, and local include-path verification. Compilation and test execution 
intentionally skipped as requested. This release branch does not contain 
`build-support/check-build-hygiene.sh`.
   - Behavior changed: Yes; loaded PK roots affect SegmentCache eviction 
weight. Evicted segments remain usable through active shared pointers; more 
frequent eviction may increase index reloads.
   - Does this need documentation: No.
   


-- 
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]

Reply via email to