You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bruce Johnson <br...@fullstory.com> on 2014/09/25 00:56:20 UTC

Does soft commit block on autowarming?

I currently have an algorithm that needs to know whether query results are
fresh up to a known point in time, and I'm using an explicit soft commit
request to act as a latch point. I record the time T just before I issue a
soft commit request, and when it returns, I assume that query results
include all documents indexed prior to T. (Note that I record T *prior* to
issuing the soft commit request, to avoid the obvious race.)

Is that sound? Is it reliably true that once a soft commit request returns,
any subsequent queries will hit a new (and autowarmed) searcher? I'm
specifically wondering whether Solr might continue to autowarm a new
pending searcher in the background after claiming to finish the soft commit
and then at some unknown point later switch to the newer searcher, such
that queries can hit a stale searcher accidentally.

Hope that question makes sense. Any help, pointers to code, whatever, would
be greatly appreciated!

- Bruce

Re: Does soft commit block on autowarming?

Posted by Yonik Seeley <yo...@heliosearch.com>.
On Wed, Sep 24, 2014 at 6:56 PM, Bruce Johnson <br...@fullstory.com> wrote:
> Is it reliably true that once a soft commit request returns,
> any subsequent queries will hit a new (and autowarmed) searcher?

Yes.
The default for commit and softCommit commands is waitSearcher=true,
which will not return until a new searcher is "registered".  After
that point, you're guaranteed to get the new searcher for any
requests.  Autowarming happens before searcher registration and hence
isn't an issue.

-Yonik
http://heliosearch.org - native code faceting, facet functions,
sub-facets, off-heap data