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 2021/07/22 07:50:00 UTC

[jira] [Updated] (KAFKA-13122) Close KeyValueIterator implemented instance to avoid resource leak

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

Luke Chen updated KAFKA-13122:
------------------------------
    Description: 
Found there are "many" KeyValueIterator implemented instances don't explicitly get closed, which will cause resource leak. This issue mostly happen in tests because we usually query state store to get result iterator, and then do verification, but forgot close it. This issue also appear in the example code in our developer guide docs.

 

I'll use try-with-resource to fix them, and to avoid huge PR created, I split this bug into 3 sub-tasks.

  was:Found there are "many" KeyValueIterator implemented instances don't explicitly get closed, which will cause resource leak. This issue mostly happen in tests because we usually query state store to get result iterator, and then do verification, but forgot close it. This issue also appear in the example code in our developer guide docs.


> Close KeyValueIterator implemented instance to avoid resource leak
> ------------------------------------------------------------------
>
>                 Key: KAFKA-13122
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13122
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>            Reporter: Luke Chen
>            Assignee: Luke Chen
>            Priority: Major
>
> Found there are "many" KeyValueIterator implemented instances don't explicitly get closed, which will cause resource leak. This issue mostly happen in tests because we usually query state store to get result iterator, and then do verification, but forgot close it. This issue also appear in the example code in our developer guide docs.
>  
> I'll use try-with-resource to fix them, and to avoid huge PR created, I split this bug into 3 sub-tasks.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)