[
https://issues.apache.org/jira/browse/KAFKA-21125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116606#comment-18116606
]
Jiayao Sun commented on KAFKA-21125:
------------------------------------
Hi [~avishekdas], thanks for checking. I’m currently working on this.
> Ensure the remote metrics get removed on leadership change
> ----------------------------------------------------------
>
> Key: KAFKA-21125
> URL: https://issues.apache.org/jira/browse/KAFKA-21125
> Project: Kafka
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: Jiayao Sun
> Priority: Minor
>
> KAFKA-21098 and KAFKA-21124 add the guard to the methods that update the
> metrics. However, the guard is not 100% reliable since the race between the
> check and the update could still re-register the metrics.
> A simple approach is that the tasks should remove their own metrics when they
> exit after being cancelled. The deletion is idempotent so we can tolerate the
> duplicate delete operations 🙂
--
This message was sent by Atlassian Jira
(v8.20.10#820010)