Re: Commit while addIndexes is in progress

2008-07-11 Thread Michael McCandless
Ning Li wrote: I think there're similar problems with calling optimize() while addIndexes is in progress... I think we should disallow that? Optimize waits for addIndexes to finish? I think it's useful to allow addIndexes during maybeMerge and optimize, no? OK I agree it would be nice

Re: Commit while addIndexes is in progress

2008-07-11 Thread Michael McCandless
Yonik Seeley wrote: On Fri, Jul 11, 2008 at 2:38 PM, Michael McCandless <[EMAIL PROTECTED]> 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 shoul

Re: Commit while addIndexes is in progress

2008-07-11 Thread Michael McCandless
Yonik Seeley wrote: On Fri, Jul 11, 2008 at 3:27 PM, Ning Li <[EMAIL PROTECTED]> wrote: We should also disallow concurrent addIndexes, right? Hmmm, the current implementation looks like it won't currently won't work correctly (docWriter.resumeAllThreads() being called while another thread is

Re: Commit while addIndexes is in progress

2008-07-11 Thread Yonik Seeley
On Fri, Jul 11, 2008 at 3:27 PM, Ning Li <[EMAIL PROTECTED]> wrote: > We should also disallow concurrent addIndexes, right? Hmmm, the current implementation looks like it won't currently won't work correctly (docWriter.resumeAllThreads() being called while another thread is calling addIndexes, etc

Re: Commit while addIndexes is in progress

2008-07-11 Thread Yonik Seeley
On Fri, Jul 11, 2008 at 2:38 PM, Michael McCandless <[EMAIL PROTECTED]> 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

Re: Commit while addIndexes is in progress

2008-07-11 Thread Ning Li
> What should it "mean" when you call commit(), while another thread is in the > middle of addIndexes? > > 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 ... an

Re: Commit while addIndexes is in progress

2008-07-11 Thread Michael McCandless
Hmm, I think we should. What should it "mean" when you call commit(), while another thread is in the middle of addIndexes? 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

Commit while addIndexes is in progress

2008-07-11 Thread Ning Li
Hi, Should we guard against the case when commit() is called during addIndexes? Otherwise, errors such as a file does not exist could happen during commit. Cheers, Ning Li - To unsubscribe, e-mail: [EMAIL PROTECTED] For addition