Skip to content

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

Merged
morningman merged 2 commits into
apache:branch-4.0from
freemandealer:pick-branch-4.0-pr-64381-20260612
Jun 24, 2026
Merged

branch-4.0: [improvement](filecache) limit file cache LRU replay queues(pick#64381)#64462
morningman merged 2 commits 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.

@freemandealer
freemandealerforce-pushed the pick-branch-4.0-pr-64381-20260612 branch from 75308d5 to d14b3b3CompareJune 13, 2026 10:03
@freemandealer

Copy link
Copy Markdown
MemberAuthor

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

@freemandealer

Copy link
Copy Markdown
MemberAuthor

run buildall

### 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
freemandealerforce-pushed the pick-branch-4.0-pr-64381-20260612 branch from d14b3b3 to 2fd9b90CompareJune 14, 2026 05:22
@freemandealer

Copy link
Copy Markdown
MemberAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 88.06% (118/134) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage71.41% (25508/35718)
Line Coverage54.30% (270451/498068)
Region Coverage51.74% (223453/431909)
Branch Coverage53.26% (96396/181006)

@freemandealer

Copy link
Copy Markdown
MemberAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 88.06% (118/134) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage71.43% (25511/35716)
Line Coverage54.34% (270666/498077)
Region Coverage51.98% (224515/431918)
Branch Coverage53.38% (96624/181016)

@freemandealer

Copy link
Copy Markdown
MemberAuthor

run nonConcurrent

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 88.06% (118/134) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage71.43% (25511/35716)
Line Coverage54.34% (270672/498077)
Region Coverage52.01% (224621/431918)
Branch Coverage53.38% (96634/181016)

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman
morningman merged commit d71b0cd into apache:branch-4.0Jun 24, 2026
28 of 31 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@freemandealer@hello-stephen@gavinchou@morningman