Skip to content

MINOR: Invoke share group rebalance sensor. #20006

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 5 commits into from
Jun 21, 2025

Conversation

smjn
Copy link
Collaborator

@smjn smjn commented Jun 20, 2025

  • The share group rebalance metric was not being invoked at the
    appropriate group id bump position.
  • This PR solves the issue.
  • The metric name has been updated
    (s/rebalance-rate/share-group-rebalance-rate,
    s/rebalance-count/share-group-rebalance-count/)
  • Updated tests in GroupMetadataManagerTest and
    GroupCoordinatorMetricsTest

Reviewers: Andrew Schofield [email protected]

@smjn smjn requested a review from apoorvmittal10 June 20, 2025 15:38
@github-actions github-actions bot added the triage PRs from the community label Jun 20, 2025
@smjn smjn requested a review from AndrewJSchofield June 20, 2025 15:38
@github-actions github-actions bot added the small Small PRs label Jun 20, 2025
@smjn smjn added KIP-932 Queues for Kafka ci-approved and removed triage PRs from the community labels Jun 20, 2025
Copy link
Member

@AndrewJSchofield AndrewJSchofield left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. This is clearly correcting a mistake. Good catch.

@@ -2575,6 +2576,10 @@ private CoordinatorResult<Map.Entry<ShareGroupHeartbeatResponseData, Optional<In
records
) || initializedAssignmentPending(group);

if (bumpGroupEpoch) {
metrics.record(SHARE_GROUP_REBALANCES_SENSOR_NAME);
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason why this metric is not recorded on line 2618, just after the log.info("[GroupId {}] Bumped group epoch...?

Copy link
Collaborator Author

@smjn smjn Jun 20, 2025

Choose a reason for hiding this comment

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

Yes, that would be more appropriate

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. I'm just aiming to get the different group types to do this stuff in the same way.

@smjn
Copy link
Collaborator Author

smjn commented Jun 20, 2025

@AndrewJSchofield Thanks for the review, incorporated comments.

@smjn smjn requested a review from AndrewJSchofield June 20, 2025 16:22
@AndrewJSchofield AndrewJSchofield merged commit 815dd93 into apache:trunk Jun 21, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved KIP-932 Queues for Kafka small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants