[
https://issues.apache.org/jira/browse/KAFKA-19504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chia-Ping Tsai updated KAFKA-19504:
-----------------------------------
Affects Version/s: 4.0.0
> AdminClient creates and adds second metrics reporter
> -----------------------------------------------------
>
> Key: KAFKA-19504
> URL: https://issues.apache.org/jira/browse/KAFKA-19504
> Project: Kafka
> Issue Type: Task
> Components: clients
> Affects Versions: 4.0.0, 4.1.0
> Reporter: Bill Bejeck
> Assignee: Bill Bejeck
> Priority: Blocker
>
> The `AdminClient` adds a telemetry reporter to the metrics reporters list in
> the constructor. The problem is that the reporter was already added in the
> `createInternal` method. In the `createInternal` method call, the
> `clientTelemetryReporter` is added to a `List<MetricReporters>` which is
> passed to the `Metrics` object, will get closed when `Metrics.close()` is
> called. But adding a reporter to the reporters list in the constructor is
> not used by the `Metrics` object and hence doesn't get closed, causing a
> memory leak. Note, this problem only exists if telemetry metrics is enabled
> for the `AdminClient` and it is disabled by default.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)