Hello

A commit.lock can get left by a process that dies in the middle of reading the index, for example because of an OutOfMemoryError. How can I handle such a left lock gracefully the next time the process runs? Checking if there is a lock is straight forward - but how can I be sure that it is not just a current lock created by another thread? The only methods I find to deal with the lock is IndexReader.isLocked() and IndexReader.unlock(). I would like to know the lock age - if it is older than a certain age then I can remove it. How do other people deal with left over locks?

Claes
--

Claes Holmerson
Polopoly - Cultivating the information garden
Kungsgatan 88, SE-112 27 Stockholm, SWEDEN
Direct: +46 8 506 782 59
Mobile: +46 704 47 82 59
Fax:  +46 8 506 782 51
[EMAIL PROTECTED], http://www.polopoly.com


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



Reply via email to