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 Prasanna Ranganathan <pr...@netflix.com> on 2009/11/02 22:26:57 UTC

Question regarding snapinstaller

 It looks like the snapinstaller script does an atomic remove and replace of
the entire solr_home/data_dir/index folder with the contents of the new
snapshot before issuing a commit command. I am trying to understand the
implication of the same.

 What happens to queries that come during the time interval between the
instant the existing directory is removed and the commit command gets
finalized? Does a currently running instance of Solr not need the files in
the index folder to serve the query results? Are all the contents of the
index folder loaded into memory?
 
 Thanks in advance for any help.

Regards,

Prasanna.

Re: Question regarding snapinstaller

Posted by Lance Norskog <go...@gmail.com>.
In Posix-compliant systems (basically Unix system calls) a file exists
independent of file names, and there can be multiple names for a file.
If a program has a file open, that file can be deleted but it will
still exist until the program closes (or the program exits).

In the snapinstaller cycle, Solr holds the old index files open while
snapinstaller swaps in the new set. The 'commit' operation causes Solr
to (eventually) close all of the old index files and at that point
they will go away.

On Mon, Nov 2, 2009 at 1:26 PM, Prasanna Ranganathan
<pr...@netflix.com> wrote:
>
>  It looks like the snapinstaller script does an atomic remove and replace of
> the entire solr_home/data_dir/index folder with the contents of the new
> snapshot before issuing a commit command. I am trying to understand the
> implication of the same.
>
>  What happens to queries that come during the time interval between the
> instant the existing directory is removed and the commit command gets
> finalized? Does a currently running instance of Solr not need the files in
> the index folder to serve the query results? Are all the contents of the
> index folder loaded into memory?
>
>  Thanks in advance for any help.
>
> Regards,
>
> Prasanna.
>



-- 
Lance Norskog
goksron@gmail.com