lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: Commit while addIndexes is in progress
Date Fri, 11 Jul 2008 20:24:55 GMT
On Fri, Jul 11, 2008 at 2:38 PM, Michael McCandless
<lucene@mikemccandless.com> wrote:
>
> Hmm, I think we should.
>
> What should it "mean" when you call commit(), while another thread is in the
> middle of addIndexes?

Seems like either all or none of the segments in addIndexes should be committed.

> We could 1) disallow it (throw an exception if you try), 2) allow it but
> block until addIndexes is done, 3) allow it but commit all changes up until
> when addIndexes was first called ... anything else?

I think either 2 or 3 is reasonable, and we could avoid defining
which, as long as we do something reasonable.  If the application
really cares which is done, they should be synchronizing at a higher
level themselves.

> I think there're similar problems with calling optimize() while addIndexes
> is in progress... I think we should disallow that?

I don't think it should throw an exception... it seems like any kind
of constraint like that should be handled by IndexWriter.

-Yonik

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


Mime
View raw message