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

Aaron Beppu updated SOLR-2860:
------------------------------

    Attachment: trackingwriters.patch

diff correcting the problem
                
> In solr-test-framework, SolrTestCaseJ4 tracking of SolrIndexWriter opens / 
> closes is incorrect
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2860
>                 URL: https://issues.apache.org/jira/browse/SOLR-2860
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>            Reporter: Aaron Beppu
>            Priority: Trivial
>         Attachments: trackingwriters.patch
>
>
> This appears to be a simple copy/paste error, where someone attempted to copy 
> the code for tracking open/close counts on SolrIndexSearcher,  and use it to 
> track open/close counts on SolrIndexWriter, but didn't update all of the 
> variables. In particular :
> -- the "startTrackingWriters()" method sets the values of numOpens and 
> numCloses, not numWriterOpens and numWriterCloses
> -- because in "beforeClassSolrTestCase()", startTrackingWriters() is called 
> after startTrackingSearchers(), this means that the "start" counts referenced 
> by startTrackingSearchers can be incorrect. This can cause 
> "endTrackingSearchers()" to report nonsensical (e.g. negative) open or close 
> counts in test cases.
> -- inside "endTrackingWriters()", the test condition for detecting when 
> writers have been opened but not closed uses numOpens / numCloses, even 
> though the error message it logs uses numWriterOpens / numWriterCloses.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to