Skip to content

branch-4.0: [improvement](filecache) limit file cache LRU replay queues(pick#64381)#64462

Open
freemandealer wants to merge 1 commit into
apache:branch-4.0from
freemandealer:pick-branch-4.0-pr-64381-20260612
Open

branch-4.0: [improvement](filecache) limit file cache LRU replay queues(pick#64381)#64462
freemandealer wants to merge 1 commit into
apache:branch-4.0from
freemandealer:pick-branch-4.0-pr-64381-20260612

Conversation

@freemandealer

Copy link
Copy Markdown
Member

Pick from #64381

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@gavinchou

Copy link
Copy Markdown
Contributor

run buildall

@gavinchou

Copy link
Copy Markdown
Contributor
be/src/io/cache/block_file_cache.cpp:43:10: fatal error: 'common/check.h' file
not found
   43 | #include "common/check.h"
      |          ^~~~~~~~~~~~~~~~
1 error generated.

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: File cache LRU log replay needs tighter default replay latency, bounded in-memory queues, and observability for pending block LRU updates and LRU log replay. This change lowers the replay interval default to 1 ms, adds hard caps for the pending block update queue and per-type LRU log queues, preserves existing LRU log backlog when tail recording is disabled, and exposes queue length plus monotonic produce/consume/idle counters. QPS bvars are not added because Prometheus can derive rates from the counters. Tests that depended on background replay timing now use a deterministic single-replay helper with a high background interval.

### Release note

Add bounded file cache LRU recorder queues and replay/update queue count metrics.

### Check List (For Author)

- Test: Manual test
    - `PATH=/mnt/disk1/zhangzhengyu/build-dep/ldb_toolchain.back/bin:$PATH build-support/clang-format.sh`
    - `PATH=/mnt/disk1/zhangzhengyu/build-dep/ldb_toolchain.back/bin:$PATH build-support/check-format.sh`
    - Focused BE UT rerun was started but stopped during compilation at reviewer request; no completed BE UT result after the latest metric cleanup.
- Behavior changed: Yes. File cache LRU replay defaults to 1 ms, LRU log and block update queues are capped at 500000 by default, and disabling tail record enqueueing no longer clears existing replay backlog.
- Does this need documentation: No

(cherry picked from commit de23f15)
Picked-from: apache#64381
@freemandealer freemandealer force-pushed the pick-branch-4.0-pr-64381-20260612 branch from 75308d5 to d14b3b3 Compare June 13, 2026 10:03
@freemandealer

Copy link
Copy Markdown
Member Author

Fixed branch-4.0 compile compatibility for the previous BE/BE UT failure by removing the master-only common/check.h dependency and replacing DORIS_CHECK_GE/GT with branch-4.0-compatible DORIS_CHECK(...) in d14b3b3.

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants