You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2025/04/03 07:19:00 UTC
[jira] [Resolved] (KAFKA-18923) resource leak in RSM fetchIndex inputStream
[ https://issues.apache.org/jira/browse/KAFKA-18923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Chen resolved KAFKA-18923.
-------------------------------
Resolution: Fixed
> resource leak in RSM fetchIndex inputStream
> -------------------------------------------
>
> Key: KAFKA-18923
> URL: https://issues.apache.org/jira/browse/KAFKA-18923
> Project: Kafka
> Issue Type: Bug
> Reporter: Luke Chen
> Assignee: PoAn Yang
> Priority: Major
> Labels: newbie
> Fix For: 4.1.0
>
>
> The RemoteStorageManager.fetchIndex returns an inputStream, and the resource should be released explicitly. I found some places we forgot to close it. Ex: [here|https://github.com/apache/kafka/blob/6677bf7b21ae7022ac094a39ae2f640f95cc30b9/core/src/main/java/kafka/server/TierStateMachine.java#L153], [here|https://github.com/apache/kafka/blob/6677bf7b21ae7022ac094a39ae2f640f95cc30b9/core/src/main/java/kafka/server/TierStateMachine.java#L168], and more
>
> Note, we also need to check RemoteStorageManager.fetchLogSegment usage.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)