You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Luke Chen (Jira)" <ji...@apache.org> on 2025/03/05 07:00:00 UTC

[jira] [Created] (KAFKA-18923) resource leak in RSM fetchIndex inputStream

Luke Chen created KAFKA-18923:
---------------------------------

             Summary: 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


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)