Skip to content

[improvement](fe) Add virtual compute group switch metric #63036 - #64385

Merged
morningman merged 2 commits into
apache:branch-4.0from
luwei16:pick/pr-63036-to-branch-4.0
Jul 30, 2026
Merged

[improvement](fe) Add virtual compute group switch metric #63036#64385
morningman merged 2 commits into
apache:branch-4.0from
luwei16:pick/pr-63036-to-branch-4.0

Conversation

@luwei16

Copy link
Copy Markdown
Contributor

pick master #63036

Problem Summary: Add an FE cloud metric that records virtual compute group active-standby switch events. The metric key uses virtual/src/dst compute group ids so a compute group rename updates the exposed labels without leaving stale old-name series.

Prometheus output example:

doris_fe_virtual_compute_group_switch_total{virtual_compute_group_id="id1",virtual_compute_group_name="v_group_1",src_compute_group_id="id2",src_compute_group_name="p_group_1",dst_compute_group_id="id3",dst_compute_group_name="p_group_2"} 1

The metric value is the accumulated switch count for the labeled virtual compute group switch path.

Add FE metric doris_fe_virtual_compute_group_switch_total for virtual compute group active-standby switches.

  • Test:
    • Unit Test: bash run-fe-ut.sh --run org.apache.doris.cloud.system.CloudSystemInfoServiceTest
    • Unit Test: bash run-fe-ut.sh --run org.apache.doris.metric.MetricsTest
    • Manual test: git diff --check
    • FE checkstyle: bash -lc "export DORIS_HOME=$PWD && source env.sh && cd fe && ${MVN_CMD} -pl fe-core -DskipTests checkstyle:check"
  • Behavior changed: Yes. Add a new FE metric for virtual compute group active-standby switches.
  • Does this need documentation: No

Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Add an FE cloud metric that records virtual compute group active-standby switch events. The metric key uses virtual/src/dst compute group ids so a compute group rename updates the exposed labels without leaving stale old-name series.
Prometheus output example:
```text
doris_fe_virtual_compute_group_switch_total{virtual_compute_group_id="id1",virtual_compute_group_name="v_group_1",src_compute_group_id="id2",src_compute_group_name="p_group_1",dst_compute_group_id="id3",dst_compute_group_name="p_group_2"} 1
```
The metric value is the accumulated switch count for the labeled virtual compute group switch path.
Add FE metric doris_fe_virtual_compute_group_switch_total for virtual compute group active-standby switches.
- Test:
- Unit Test: bash run-fe-ut.sh --run org.apache.doris.cloud.system.CloudSystemInfoServiceTest
- Unit Test: bash run-fe-ut.sh --run org.apache.doris.metric.MetricsTest
- Manual test: git diff --check
- FE checkstyle: bash -lc "export DORIS_HOME=$PWD && source env.sh && cd fe && ${MVN_CMD} -pl fe-core -DskipTests checkstyle:check"
- Behavior changed: Yes. Add a new FE metric for virtual compute group active-standby switches.
- Does this need documentation: No
@luwei16
luwei16 requested a review from morningman as a code ownerJune 10, 2026 15:20
@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?

@luwei16luwei16 changed the title [improvement](fe) Add virtual compute group switch metric (#63036)[improvement](fe) Add virtual compute group switch metric #63036Jun 10, 2026
@luwei16

Copy link
Copy Markdown
ContributorAuthor

run buildall

### What problem does this PR solve?
Issue Number: None
Related PR: apache#64385
Problem Summary: Merge the latest branch-4.0 into the PR branch and resolve the MetricsTest conflict by keeping both the virtual compute group switch metric test and the cloud warm-up metric tests from the target branch.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- ./run-fe-ut.sh --run org.apache.doris.metric.MetricsTest
- Behavior changed: No
- Does this need documentation: No
@luwei16

Copy link
Copy Markdown
ContributorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 50.00% (17/34) 🎉
Increment coverage report
Complete coverage report

@luwei16

Copy link
Copy Markdown
ContributorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 50.00% (17/34) 🎉
Increment coverage report
Complete coverage report

@morningman
morningman merged commit 11fef48 into apache:branch-4.0Jul 30, 2026
27 of 31 checks passed
Sign up for freeto 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

@luwei16@hello-stephen@morningman