lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
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
semantics.

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

http://blog.mikemccandless.com

On Tue, Jan 31, 2012 at 10:41 PM, superruiye <superruiye@gmail.com> 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: http://lucene.472066.n3.nabble.com/Why-read-past-EOF-tp3639401p3705542.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message