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

Christine Poerschke updated SOLR-10778:
---------------------------------------
    Attachment: dated-warnings
                dated-warnings.log

We obviously cannot take care of all the warnings overnight but we can 
incrementally take care of existing warnings and watch out for new warnings 
appearing. It's difficult though to spot new warnings amongst the copious 'ant 
precommit' output.

With all of that in mind I've created a little _dated-warnings_ shell script 
that correlates warnings with git commit history. Attaching both the script and 
its current output, for convenience also here copied/pasted from the script the 
warnings for June 2017 (so far):

* 2017-06-21 
http://www.github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java#L843
* 2017-06-21 
http://www.github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/index/FrozenBufferedUpdates.java#L186
* 2017-06-21 
http://www.github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/index/FrozenBufferedUpdates.java#L144
* 2017-06-20 
http://www.github.com/apache/lucene-solr/blob/master/solr/core/src/test/org/apache/solr/core/DirectoryFactoryTest.java#L53
* 2017-06-16 
http://www.github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/common/util/Utils.java#L110
* 2017-06-16 
http://www.github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/common/util/CommandOperation.java#L248
* 2017-06-16 
http://www.github.com/apache/lucene-solr/blob/master/solr/core/src/test/org/apache/solr/util/TestUtils.java#L186

If folks think this is useful then I'd be happy to periodically re-run the 
script and share results here.


> Ant precommit task WARNINGS about unclosed resources
> ----------------------------------------------------
>
>                 Key: SOLR-10778
>                 URL: https://issues.apache.org/jira/browse/SOLR-10778
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: clients - java
>    Affects Versions: 4.6
>            Reporter: Andrew Musselman
>            Priority: Minor
>         Attachments: dated-warnings, dated-warnings.log, notclosed.txt
>
>
> During precommit we are seeing lots of warnings about resources that aren't 
> being closed, which could pose problems based on chat amongst the team. Log 
> snippet for example:
>     [mkdir] Created dir: 
> /var/folders/5p/6b46rm_94dzc5m8d4v56tds40000gp/T/ecj1165341501
>  [ecj-lint] Compiling 419 source files to 
> /var/folders/5p/6b46rm_94dzc5m8d4v56tds40000gp/T/ecj1165341501
>  [ecj-lint] ----------
>  [ecj-lint] 1. WARNING in 
> /path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/impl/LBHttpSolrClient.java
>  (at line 920)
>  [ecj-lint]     new LBHttpSolrClient(httpSolrClientBuilder, httpClient, 
> solrServerUrls) :
>  [ecj-lint]     
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  [ecj-lint] Resource leak: '<unassigned Closeable value>' is never closed
>  [ecj-lint] ----------
>  [ecj-lint] ----------
>  [ecj-lint] 2. WARNING in 
> /path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/impl/StreamingBinaryResponseParser.java
>  (at line 49)
>  [ecj-lint]     JavaBinCodec codec = new JavaBinCodec() {
>  [ecj-lint]                  ^^^^^
>  [ecj-lint] Resource leak: 'codec' is never closed
>  [ecj-lint] ----------
>  [ecj-lint] ----------
>  [ecj-lint] 3. WARNING in 
> /path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java
>  (at line 90)
>  [ecj-lint]     JavaBinCodec codec = new JavaBinCodec();
>  [ecj-lint]                  ^^^^^
>  [ecj-lint] Resource leak: 'codec' is never closed
>  [ecj-lint] ----------
>  [ecj-lint] 4. WARNING in 
> /path/to/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java
>  (at line 113)
>  [ecj-lint]     JavaBinCodec codec = new JavaBinCodec() {
>  [ecj-lint]                  ^^^^^
>  [ecj-lint] Resource leak: 'codec' is never closed



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to