lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18177] - IndexWriter ctor does not release lock on exception
Date Thu, 20 Mar 2003 03:11:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18177>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18177

IndexWriter ctor does not release lock on exception





------- Additional Comments From zaphod@byzantine.no  2003-03-20 03:11 -------
Thank you, that will at least work if there is a single processing controlling the directory.

I still think the bug is a bug, though. If the constructor fails, the lock is not cleaned
up. It's sloppy coding. The constructor may fail for other reasons -- out of memory, file
permission failure etc., all of which will botch up the index directory state by leaving a
dead lock. Fixing it is as simple is as simple as wrapping the latter part of the ctor in
a try..catch block and releasing the lock on exception.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message