8000 [Enhancement] change a few metrics fe leader awareness by kevincai · Pull Request #59883 · StarRocks/starrocks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Enhancement] change a few metrics fe leader awareness #59883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

kevincai
Copy link
Contributor
@kevincai kevincai commented Jun 13, 2025
  • add label is_leader={"true"|"false"} for those metrics that distinguish between leader and follower

Why I'm doing:

What I'm doing:

Fixes #59887

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.5
    • 3.4
    • 3.3

@kevincai kevincai requested a review from a team as a code owner June 13, 2025 06:36
@kevincai kevincai changed the title [Enhancement] change a few metrics be leader awareness [Enhancement] change a few metrics fe leader awareness Jun 13, 2025
@kevincai kevincai force-pushed the enhance/leader-aware-metric branch from ed35ddb to d6a2984 Compare June 13, 2025 09:23
@kevincai kevincai force-pushed the enhance/leader-aware-metric branch from d6a2984 to 4b61474 Compare June 14, 2025 13:05
@@ -126,6 +126,9 @@ public class FeConstants {
public static final String DOCUMENT_ALTER_ROUTINE_LOAD =
"https://docs.starrocks.io/docs/sql-reference/sql-statements/data-manipulation/ALTER_ROUTINE_LOAD";

// Historic reason naming as "is_master" rather than "is_leader"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't meet the requirement of the customers. They want to get the consistent metrics between FE leader and FE followers.

  1. In current situation, I think we should forward to the leader to get the metrics.
  2. In final, we should sync the metrics between FE leader and followers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a matter of fact how the system is designed, not how the system is required by the customer.

@kevincai kevincai force-pushed the enhance/leader-aware-metric branch from 4b61474 to a3cc92b Compare June 16, 2025 02:04
* add label `is_master={"true"|"false"}` for those metrics that
  distinguish between leader and follower

Signed-off-by: Kevin Cai <kevin.cai@celerdata.com>
@kevincai kevincai force-pushed the enhance/leader-aware-metric branch from a3cc92b to d08ca96 Compare June 16, 2025 02:14
Copy link

Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 20 / 20 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/metric/MetricRepo.java 7 7 100.00% []
🔵 com/starrocks/metric/LeaderAwareGaugeMetricLong.java 3 3 100.00% []
🔵 com/starrocks/metric/LeaderAwareGaugeMetric.java 10 10 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@kevincai kevincai merged commit bf269c8 into StarRocks:main Jun 17, 2025
56 checks passed
Copy link

@Mergifyio backport branch-3.5

Copy link

@Mergifyio backport branch-3.4

Copy link
Contributor
mergify bot commented Jun 17, 2025

backport branch-3.5

✅ Backports have been created

Copy link
Contributor
mergify bot commented Jun 17, 2025

backport branch-3.4

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 17, 2025
Signed-off-by: Kevin Cai <kevin.cai@celerdata.com>
(cherry picked from commit bf269c8)
mergify bot pushed a commit that referenced this pull request Jun 17, 2025
Signed-off-by: Kevin Cai <kevin.cai@celerdata.com>
(cherry picked from commit bf269c8)
wanpengfei-git pushed a commit that referenced this pull request Jun 17, 2025
…) (#59964)

Signed-off-by: Kevin Cai <kevin.cai@celerdata.com>
Co-authored-by: Kevin Cai <caixiaohua@starrocks.com>
wanpengfei-git pushed a commit that referenced this pull request Jun 17, 2025
…) (#59965)

Signed-off-by: Kevin Cai <kevin.cai@celerdata.com>
Co-authored-by: Kevin Cai <caixiaohua@starrocks.com>
AntiTopQuark pushed a commit to AntiTopQuark/starrocks that referenced this pull request Jun 19, 2025
Signed-off-by: Kevin Cai <kevin.cai@celerdata.com>
Signed-off-by: AntiTopQuark <AntiTopQuark1350@outlook.com>
dengliu pushed a commit to dengliu/starrocks that referenced this pull request Jun 20, 2025
Signed-off-by: Kevin Cai <kevin.cai@celerdata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Metric] FE metrics include is_leader label if the metric is only meaningful on leader FE
4 participants
0