lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Björn Ekengren <bjorn.ekeng...@avanza.se>
Subject Lock obtain timed out
Date Wed, 26 Jul 2006 14:24:48 GMT
Ok, this might have been answered somewhere, but I can't find it so here goes:
 
When I close my application containing index writers the lock files are left in the temp directory
causing an "Lock obtain timed out" error upon the next restart. I works of course if I remove
the locks manually inbetween but that seems to be a strange solution. I am quite sure that
this error didn't occur a couple of days ago, but I can't figure out why. I tried to add finalize
methods that would close the writer but the don't seem to be invoked. I am currently trying
to do a soulution based on Runtime.addShutdownHook(Thread) but I'm not sure that the shutdown
thread can retrieve the index writer unless it is static. I guess that a shutdown hook could
try to delete the lock files by guessing the file names but it seems a bad solution as well.

 
--regards
 
Bjorn
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message