[ 
https://issues.apache.org/jira/browse/KAFKA-19504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias J. Sax updated KAFKA-19504:
------------------------------------
    Affects Version/s:     (was: 4.1.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
>            Reporter: Bill Bejeck
>            Assignee: Bill Bejeck
>            Priority: Blocker
>             Fix For: 4.0.1, 4.1.0
>
>
> 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)

Reply via email to