You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Guozhang Wang (Jira)" <ji...@apache.org> on 2022/06/01 19:03:00 UTC

[jira] [Commented] (KAFKA-13939) Memory Leak When Logging Is Disabled In InMemoryTimeOrderedKeyValueBuffer

    [ https://issues.apache.org/jira/browse/KAFKA-13939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545102#comment-17545102 ] 

Guozhang Wang commented on KAFKA-13939:
---------------------------------------

Thanks [~jnewhouse], I looked at the code you pointed it out and I agree it's a bug indeed, and should be fixed asap. Please let us know if you'd like to open a PR to fix it.

> Memory Leak When Logging Is Disabled In InMemoryTimeOrderedKeyValueBuffer
> -------------------------------------------------------------------------
>
>                 Key: KAFKA-13939
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13939
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Jackson Newhouse
>            Priority: Blocker
>
> If `loggingEnabled` is false, the `dirtyKeys` Set is not cleared within `flush()`, see [https://github.com/apache/kafka/blob/3.2/streams/src/main/java/org/apache/kafka/streams/state/internals/InMemoryTimeOrderedKeyValueBuffer.java#L262.] However, dirtyKeys is still written to in the loop within `evictWhile`. This causes dirtyKeys to continuously grow for the life of the buffer. 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)