Yeah, it may not be so simple as I assumed eh? Really appreciate the
tips, I'll spend some real time going over things rather than relying
so much on the tests.
- Mark
On Aug 13, 2008, at 11:31 PM, "Yonik Seeley (JIRA)" <[EMAIL PROTECTED]>
wrote:
[ https://issues.apache.org/jira/browse/SOLR-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622430#action_12622430
]
Yonik Seeley commented on SOLR-374:
-----------------------------------
You've involved yourself in one of the more complicated methods in
Solr ;-)
- Latest patch has a new race condition: _searcher.incref() may be
called after a final _searcher.decref() closes the searcher/reader.
- we shouldn't need to check if _searcher==null or not... there may
be searchers open that have not yet been registered.
- 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)
- returning a RefCounted<SolrIndexSearcher> immediately can expose
it before it was supposed to be used (before warming has completed,
etc)
- returning a RefCounted<SolrIndexSearcher> is not always the right
thing to do - it depends on the parameters to the function.
There are really two different optimizations here:
1) call IndexReader.reopen() and share parts of the most recently
opened IndexReader
2) if the IndexReader didn't change, avoid going through warming,
autowarming, etc and just reuse the same searcher
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
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.