lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Resnick <jresn...@gmail.com>
Subject confused about segment merging and commits
Date Wed, 27 Sep 2017 12:58:58 GMT
Hi,

I am trying to understand how segment merging interacts with commits.

Consider the following timeline of events:

1. IndexWriter is opened on an index.
2. IndexWriter is used to add/update/delete docs, but not yet commit the
changes.
3. Activity in step 2 triggers segment merging on a background thread.
4. Commit() is called on IndexWriter while merging in step 3 has not yet
finished.

Does the Commit() in step 4 block while the segment merge in step 3
finishes?
If not, then when is the segment merge in 3 "committed" to the index? (i.e.
at what point would a new IndexReader see the merged segment file?)
Or does segment merging happen entirely independently of commits?

[More context: we are trying to build a backup system that copies the index
files to a backup server after every commit. Initially I thought it would
be sufficient to just keep track of file add/update/deletes since the
previous commit, but if segment merging is happening concurrently then
perhaps it's not so simple?]

More generally, is there any in-depth documentation available describing
how segment merging interacts with commits (even if it's for the Java
version of Lucene)?  My web searches have not turned up much...

Many thanks,
Jonathan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message