lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-2860) In solr-test-framework, SolrTestCaseJ4 tracking of SolrIndexWriter opens / closes is incorrect
Date Tue, 01 Nov 2011 21:07:32 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141593#comment-13141593
] 

Hoss Man commented on SOLR-2860:
--------------------------------

Aaron: great catch.

I was going to commit your patch, but in asking for a second set of eyeballs on irc, rmuir
pointed out that this check is actually redundant now - MockDirectoryWrapper is used in all
Solr tests, and it verifies that all files are closed cleanly by the SolrIndexWriters
                
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message