lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Why read past EOF
Date Wed, 01 Feb 2012 11:18:23 GMT
Right, you have to ensure (by using the "right" IndexDeletionPolicy)
that no commit is ever removed until all readers open against that
commit have been closed.

"Normally" the filesystem ensures this for us (protects still-open
files from being deleted), but NFS (unfortunately!) lacks such

Persistent/SnapshotDeletionPolicy could in theory be used here... eg
you can pull a snapshot of the current commit, then call
IndexWriter.commit, then wait for all readers to reopen, then release
the snapshot.  In theory that should work?  You can make it time
based, eg wait 30 minutes and then release the snapshot, assuming your
readers all check for (and complete) reopen more frequently than every
30 minutes.

Mike McCandless

On Tue, Jan 31, 2012 at 10:41 PM, superruiye <> wrote:
> Does it means I only to ensure reopen readers before deleted.I use default
> IndexDeletionPolicy: KeepOnlyLastCommitDeletionPolicy.And another two
> IndexDeletionPolicy,SnapshotDeletionPolicy and
> PersistentSnapshotDeletionPolicy,I am watching now.Are they useful to this
> problem?
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message