Uh oh!
There was an error while loading. Please reload this page.
branch-4.0: [opt](cloud) Add warm up job count metric on BE - #66137
branch-4.0: [opt](cloud) Add warm up job count metric on BE#66137liaoxin01 wants to merge 2 commits into
Conversation
Add a `file_cache_warm_up_job_num` bvar that tracks the number of warm up jobs currently held in a BE's memory. It is incremented when FE dispatches a new job to the BE (SET_JOB / SET_BATCH / event-driven SET_JOB) and decremented when the job is cleared (CLEAR_JOB / event-driven CLEAR_JOB). The increment/decrement are gated on actual state transitions (`_cur_job_id` going 0 -> job_id, and `_tablet_replica_cache.erase()` returning > 0), so retries, FE failover replays, and duplicate CLEAR_JOB requests do not skew the count.
Address review: the event-driven `_tablet_replica_cache` can also be erased in `get_replica_info()` when FE reports a warm up job as CANCELLED (lazy cleanup used when an explicit CLEAR_JOB is missed). That erase did not decrement `g_file_cache_warm_up_job_num`, so the metric could stay at 1 after the job is no longer held. Decrement the metric when this erase actually removes an entry, and erase the matching `_event_driven_filters` entry to stay consistent with the explicit CLEAR_JOB path in set_event().
hello-stephen
commented
Jul 27, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
liaoxin01
commented
Jul 28, 2026
run buildall |
There was a problem hiding this comment.
Pull request overview
This PR backports the addition of a per-BE bvar metric (file_cache_warm_up_job_num) to track how many file-cache warm-up jobs are currently retained in BE memory, covering both RPC-driven (SET_JOB/SET_BATCH) and event-driven warm-up flows.
Changes:
- Add new BE metric
file_cache_warm_up_job_numto track active/held warm-up jobs. - Increment/decrement the metric on real state transitions for SET_JOB/SET_BATCH, CLEAR_JOB, event-driven set/clear, and lazy cancellation cleanup.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
hello-stephen
commented
Jul 28, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jul 28, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jul 29, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
liaoxin01
commented
Jul 30, 2026
run buildall |
hello-stephen
commented
Jul 30, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jul 30, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jul 30, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jul 30, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jul 30, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Backport #64734 to branch-4.0.
What problem does this PR solve?
Issue Number: None
Related PR: #64734
Problem Summary: Add the per-BE
file_cache_warm_up_job_numbvar so operators can see how many warm-up jobs are currently held in BE memory. The count changes only on real job state transitions, so retry/replay and duplicate clear requests do not skew it. The lazy cancellation cleanup path also decrements the metric and removes the matching event filter.Release note
Add the
file_cache_warm_up_job_numBE metric.Check List (For Author)
be/src/cloud/cloud_warm_up_manager.cppgit diff --checkpassedhooks/setup_worktree.shorthirdparty/installed; CI is pending