Hi Michael / others

The one thing I discovered was that it is quite useful to implement a JVM shutdown hook in your code to prevent the index from getting corrupted when an indexing process dies unexpectantly.

For those who don't know about shutdown hook mechanism, you do this by implementing:

class Indexer extends Thread {
 Indexer() {
   Runtime.getRuntime().addShutdownHook(this);
} public void run() {
     closeIndex();
 }
}
Would this be worthwhile building into Lucene or is this already implemented?

Regards,

Jamie

Jamie wrote:
Hi Michael

Thank you. Your suggestions were great and they were implemented (see attached source code), however, unfortunately, I am still getting file not found errors on the automatic merging of indexes.

Regards,

Jamie


Michael McCandless wrote:

Jamie,

I'd love to get to the root cause of your exception.

Last time we talked (a few weeks back) I saw several possible causes in the source you had posted:

    http://markmail.org/message/dqovvcwgwof5f7wl

Did you test any of the ideas there? You are potentially manually deleting files from the index, and also forcibly removing the write.lock, which can easily cause this exception.

Mike

Jamie wrote:

Hi Paul,

I just noticed the discussion around this.

All most all of my customers have/are experiencing the intermittant FileNotFound problem.

Our software uses Lucene 2.3.1. I have just upgraded to Lucene 2.3.2 in the hope that this was one of the bugs that was fixed.

I would be very interested in a resolution or known workaround.

Thanks!

Jamie


Paul J. Lucas wrote:
On May 29, 2008, at 6:35 PM, Michael McCandless wrote:

Can you use lsof (or something similar) to see how many files you have?

FYI: I personally can't reproduce this; only a coworker can and even then it's sporadic, so it could take a little while.

Merging, especially several running at once, can greatly increase open file count, and especially if mergeFactor is increased.

That raises a few questions:

1. Should I lower my mergeFactor?

2. Is there any way to insist that only one merger runs?

3. Is there any way to insist that all merges happen synchronously, i.e., on IndexWriter.close() only and not to use a separate merge thread?

- Paul




--
Stimulus Software - MailArchiva
Email Archiving And Compliance
USA Tel: +1-713-366-8072 ext 3
UK Tel: +44-20-80991035 ext 3
Email: [EMAIL PROTECTED]
Web: http://www.mailarchiva.com




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to