Re: IndexWriter commit

2008-09-15 Thread Cam Bazz
Hello Dipen, I think what he meant is that if power is off the last transaction is trashed, but your index is not. Best. On Mon, Sep 15, 2008 at 10:55 PM, Dipen <[EMAIL PROTECTED]> wrote: > hi michael, > this is rather hard for me to understand, if a system loses power > (electricity), how can

Re: IndexWriter commit

2008-09-15 Thread Michael McCandless
It's only if power is lost *after* the call to IndexWriter.commit() has successfully returned, that the guarantee holds. commit() does not return until all newly written and referenced files in the index have been successfully fsync'd (and the OS does not return from fsync until all bytes

Re: IndexWriter commit

2008-09-15 Thread Dipen
hi michael, this is rather hard for me to understand, if a system loses power (electricity), how can it be ensured that fsync() call will happen at all, this commit function relies on fsync() but what if OS doesnt have time or power in this case to actually call fsync() and synchronize. I read ab

Re: IndexWriter commit

2008-09-15 Thread Cam Bazz
Hello, Thanks a bunch Michael. Its been a long time I wanted to upgrade to 2.4. It seems major change has been done. Best. On Mon, Sep 15, 2008 at 9:49 PM, Michael McCandless <[EMAIL PROTECTED]> wrote: > > Oh and I just committed a fix to IndexWriter's javadocs -- commit(long) is a > private met

Re: IndexWriter commit

2008-09-15 Thread Michael McCandless
Oh and I just committed a fix to IndexWriter's javadocs -- commit(long) is a private method that should never have been in the javadocs. Thanks for raising this! Mike Cam Bazz wrote: Hello, What is the difference between flush in <2.4 and commit? Also I have been looking over docs, an

Re: IndexWriter commit

2008-09-15 Thread Michael McCandless
There is no difference, unless your computer/OS crashes or loses power shortly after you had call the method. In that case, there's a big difference: commit() guarantees your index will be intact (assuming the storage system holding your index was not damaged) but with flush(), which does