Skip to content

KAFKA-19406: Remove BrokerTopicStats#removeOldFollowerMetrics #19962

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 2 commits into from
Jun 19, 2025

Conversation

gongxuanzhang
Copy link
Collaborator

@gongxuanzhang gongxuanzhang commented Jun 13, 2025

about https://issues.apache.org/jira/browse/KAFKA-19406

BTW: whether we should rename
ReplicaManager#updateLeaderAndFollowerMetrics

Reviewers: Ken Huang s7133700@gmail.com, PoAn Yang
payang@apache.org, TengYao Chi kitingiao@gmail.com, Lan Ding
isDing_L@163.com, Chia-Ping Tsai chia7712@gmail.com

@github-actions github-actions bot added triage PRs from the community core Kafka Broker storage Pull requests that target the storage module small Small PRs labels Jun 13, 2025
@gongxuanzhang gongxuanzhang added ci-approved and removed core Kafka Broker storage Pull requests that target the storage module labels Jun 13, 2025
@@ -2201,9 +2201,7 @@ class ReplicaManager(val config: KafkaConfig,
private def updateLeaderAndFollowerMetrics(newFollowerTopics: Set[String]): Unit = {
val leaderTopicSet = leaderPartitionsIterator.map(_.topic).toSet
newFollowerTopics.diff(leaderTopicSet).foreach(brokerTopicStats.removeOldLeaderMetrics)
Copy link
Member

Choose a reason for hiding this comment

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

removeOldLeaderMetrics tries to remove REPLICATION_BYTES_OUT_PER_SEC and REASSIGNMENT_BYTES_OUT_PER_SEC which apply across all topics too. Could you please remove them?

@github-actions github-actions bot removed the triage PRs from the community label Jun 14, 2025
@github-actions github-actions bot added core Kafka Broker storage Pull requests that target the storage module labels Jun 16, 2025
@Yunyung
Copy link
Collaborator

Yunyung commented Jun 16, 2025

LGTM, please correct the Jira number in PR title.

@gongxuanzhang gongxuanzhang changed the title KAFKA-1940: Remove BrokerTopicStats#removeOldFollowerMetrics KAFKA-19406: Remove BrokerTopicStats#removeOldFollowerMetrics Jun 17, 2025
Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@DL1231 DL1231 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, LGTM

@gongxuanzhang
Copy link
Collaborator Author

@chia7712 PTAL

@chia7712 chia7712 merged commit 79d2c3c into apache:trunk Jun 19, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved core Kafka Broker small Small PRs storage Pull requests that target the storage module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants