Repository navigation
Commit e7b7f1d
authored
[opt](cloud) Add warm up job count metric on BE (#64734)
## Proposed changes
Add a `file_cache_warm_up_job_num` bvar metric that tracks the number of
warm up jobs currently held in a BE's memory. This gives operators
per-BE visibility into how many warm up jobs each backend is currently
holding.
### What changed
In `be/src/cloud/cloud_warm_up_manager.cpp`:
- New `bvar::Adder<int64_t>
g_file_cache_warm_up_job_num("file_cache_warm_up_job_num")`.
- **+1** when FE dispatches a new job to this BE:
- `check_and_set_job_id` — regular (cluster/table) warm up `SET_JOB`, on
`_cur_job_id` transition `0 -> job_id`.
- `check_and_set_batch_id` — defensive, same `0 -> job_id` transition
(e.g. if a `SET_BATCH` were to arrive first).
- `set_event` — event-driven `SET_JOB`, when a new `job_id` is inserted
into `_tablet_replica_cache`.
- **-1** when the job is cleared:
- `clear_job` — regular `CLEAR_JOB`, only when a live job actually
existed.
- `set_event` (clear) — event-driven `CLEAR_JOB`, only when
`_tablet_replica_cache.erase()` actually removed an entry.1 parent efa3748 commit e7b7f1d
1 file changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
440 | 444 | | |
441 | 445 | | |
442 | 446 | | |
| 447 | + | |
443 | 448 | | |
444 | 449 | | |
445 | 450 | | |
| |||
458 | 463 | | |
459 | 464 | | |
460 | 465 | | |
| 466 | + | |
461 | 467 | | |
462 | 468 | | |
463 | 469 | | |
| |||
503 | 509 | | |
504 | 510 | | |
505 | 511 | | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
506 | 515 | | |
507 | 516 | | |
508 | 517 | | |
| |||
525 | 534 | | |
526 | 535 | | |
527 | 536 | | |
528 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
529 | 540 | | |
530 | 541 | | |
531 | 542 | | |
532 | 543 | | |
| 544 | + | |
533 | 545 | | |
534 | 546 | | |
535 | 547 | | |
| |||
663 | 675 | | |
664 | 676 | | |
665 | 677 | | |
666 | | - | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
667 | 685 | | |
668 | 686 | | |
669 | 687 | | |
| |||
0 commit comments