[
https://issues.apache.org/jira/browse/SOLR-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141643#comment-13141643
]
Aaron Beppu commented on SOLR-2860:
-----------------------------------
Thanks for cleaning this up!
> 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
> Assignee: Hoss Man
> Priority: Trivial
> Fix For: 4.0
>
> 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: [email protected]
For additional commands, e-mail: [email protected]