[ https://issues.apache.org/jira/browse/SOLR-374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Miller updated SOLR-374: ----------------------------- Attachment: SOLR-374.patch * Latest patch has a new race condition: _searcher.incref() may be called after a final _searcher.decref() closes the searcher/reader. Right...since I shouldn't even be returning _searcher, that goes away I think * we shouldn't need to check if _searcher==null or not... there may be searchers open that have not yet been registered. Right....gone. * if the reader from the newest searcher is equal to it's reopen, you return the registered searcher (which may actually be different from the newest searcher) Right....gone. * returning a RefCounted<SolrIndexSearcher> immediately can expose it before it was supposed to be used (before warming has completed, etc) Right....gone. * returning a RefCounted<SolrIndexSearcher> is not always the right thing to do - it depends on the parameters to the function. Good point :) So I guess the key on this patch (as you pointed out) is that it is two optimizations, and the not doing anything if the Reader hasn't changed optimization really makes things more difficult - dropping it for now, I think solves pretty much each of these issues. I was right about the Reader and the tests as well...things passed because they were still wrong - so I have adjusted the two tests to actually change the index instead of just commit. I think this does just the reopen correctly but I am still scanning and checking. I definitely missed were the first sync on the search lock was closing in the earlier patch...soo many braces. > use IndexReader.reopen > ---------------------- > > Key: SOLR-374 > URL: https://issues.apache.org/jira/browse/SOLR-374 > Project: Solr > Issue Type: Improvement > Reporter: Yonik Seeley > Attachments: SOLR-374.patch, SOLR-374.patch, SOLR-374.patch > > > Take advantage of IndexReader.reopen(): LUCENE-743 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.