[ https://issues.apache.org/jira/browse/KAFKA-5985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16186059#comment-16186059 ]
ASF GitHub Bot commented on KAFKA-5985: --------------------------------------- GitHub user bbejeck opened a pull request: https://github.com/apache/kafka/pull/3994 KAFKA-5985: update javadoc regarding closing iterators You can merge this pull request into a Git repository by running: $ git pull https://github.com/bbejeck/kafka KAFKA-5985_document_need_to_close_iterators Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3994.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3994 ---- commit 36493a6313766211d53ea0986e216ae7aa1e6029 Author: Bill Bejeck <b...@confluent.io> Date: 2017-09-29T16:39:36Z KAFKA-5985: update javadoc regarding closing iterators ---- > Mention the need to close store iterators > ----------------------------------------- > > Key: KAFKA-5985 > URL: https://issues.apache.org/jira/browse/KAFKA-5985 > Project: Kafka > Issue Type: Improvement > Components: documentation, streams > Affects Versions: 0.11.0.0 > Reporter: Stanislav Chizhov > Assignee: Bill Bejeck > > Store iterators should be closed in all/most of the cases, but currently it > is not consistently reflected in the documentation and javadocs. For instance > > https://kafka.apache.org/0110/documentation/streams/developer-guide#streams_developer-guide_interactive-queries_custom-stores > does not mention the need to close an iterator and provide an example that > does not do that. > Some of the fetch methods do mention the need to close an iterator returned > (e.g. > https://kafka.apache.org/0110/javadoc/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.html#range(K,%20K)), > but others do not: > https://kafka.apache.org/0110/javadoc/org/apache/kafka/streams/state/ReadOnlyWindowStore.html#fetch(K,%20long,%20long) > It makes sense to: > - update javadoc for all store methods that do return iterators to reflect > that the iterator returned needs to be closed > - mention it in the documentation and to update related examples. -- This message was sent by Atlassian JIRA (v6.4.14#64029)