On May 29, 2008, at 6:26 PM, Michael McCandless wrote:

Paul J. Lucas wrote:

        if ( IndexReader.isLocked( INDEX ) )
            IndexReader.unlock( INDEX );

The isLocked()/unlock() is because sometimes the server process gets killed and leaves teh indexed locked.

This makes me a bit nervous. Does this only run on startup of your process, or each time you need to open the IndexWriter?

Exactly once on start-up.

Could you add some logging whenever an unlock is necessary so we can double-check that you're not accidentally un-locking the lock out from under an IndexWriter (which could cause exactly this exception)?

Such logging is not necessary since the unlock() is done before any IndexWriter is ever created.

- Paul

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

Reply via email to