[
https://issues.apache.org/jira/browse/KAFKA-14868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
hudeqi updated KAFKA-14868:
---------------------------
Description:
In some current classes, some metrics are always registered when loading, but
it often occurs that some or all metrics are forgotten to be removed when
closing. For example, in the ReplicaManager class, IsrExpandsPerSec,
IsrShrinksPerSec, and FailedIsrUpdatesPerSec are all removed by omission.
Therefore, increase the counting capability in KafkaMetricsGroup. When using
the method of KafkaMetricsGroup to add or remove a metric, it will add 1 to the
corresponding counter, so that you can check whether there is a forgotten
metric to be removed by counting and comparing in the unit test of the
corresponding class.
was:In some current classes, some metrics are always registered when loading,
but it often occurs that some or all metrics are forgotten to be removed when
closing. Therefore, increase the counting capability in KafkaMetricsGroup. When
using the method of KafkaMetricsGroup to add or remove a metric, it will add 1
to the corresponding counter, so that you can check whether there is a
forgotten metric to be removed by counting and comparing in the unit test of
the corresponding class.
> Add metric counting capability to KafkaMetricsGroup to facilitate checking
> that the metric is missed when it is closed
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-14868
> URL: https://issues.apache.org/jira/browse/KAFKA-14868
> Project: Kafka
> Issue Type: Improvement
> Reporter: hudeqi
> Assignee: hudeqi
> Priority: Major
>
> In some current classes, some metrics are always registered when loading, but
> it often occurs that some or all metrics are forgotten to be removed when
> closing. For example, in the ReplicaManager class, IsrExpandsPerSec,
> IsrShrinksPerSec, and FailedIsrUpdatesPerSec are all removed by omission.
> Therefore, increase the counting capability in KafkaMetricsGroup. When using
> the method of KafkaMetricsGroup to add or remove a metric, it will add 1 to
> the corresponding counter, so that you can check whether there is a forgotten
> metric to be removed by counting and comparing in the unit test of the
> corresponding class.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)