[
https://issues.apache.org/jira/browse/SOLR-15717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17434224#comment-17434224
]
lujie commented on SOLR-15717:
------------------------------
We do not observed resource issue, for now, these bugs have not been observable.
These bugs are detected our develped tool, this tool works like the Simple
Profiling in
[https://santhosh-tekuri.github.io/jlibs/core/GarbageCollection.html]
The tool collects the opened file but its reference count is 0 after gc.
> Fix resource leak due to Files.find
> -----------------------------------
>
> Key: SOLR-15717
> URL: https://issues.apache.org/jira/browse/SOLR-15717
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: lujie
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Files.walk and Files.find will open stream and as jdk said:
>
> * If timely disposal of file system resources is required, the
> * \{@code try}-with-resources construct should be used to ensure that the
> * stream's \{@link Stream#close close} method is invoked after the stream
> * operations are completed.
> we sould close them with try catch
>
> patch is ready! see
>
> https://github.com/apache/solr/pull/368
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]