lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Williams <mops...@gmail.com>
Subject Problem with close IndexWriter pausing due to locked files
Date Thu, 03 Dec 2009 14:30:30 GMT

Hi,


I have found an issue with a Lucene index locking files from a Searcher
instance. So that when a mergeSegments happens on a indexwriter close it
actually hangs until the search instance is closed

This seems to happen only when the index is stored on a network SAN device.
When stored elsewhere it acts normally.

Lucene version:2.1 and 2.3. going to test later versions.

The merge segments hangs here:-

DEBUG 12:59:09,993 debug.ThreadDump  -   at
java.io.WinNTFileSystem.delete0(Native Method)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
java.io.Win32FileSystem.delete(Win32FileSystem.java:504)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
java.io.File.delete(File.java:871)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
org.apache.lucene.store.FSDirectory.deleteFile(FSDirectory.java:350)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
org.apache.lucene.index.IndexFileDeleter.deleteFile(IndexFileDeleter.java:224)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
org.apache.lucene.index.IndexFileDeleter.deleteFiles(IndexFileDeleter.java:217)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
org.apache.lucene.index.IndexFileDeleter.deleteFiles(IndexFileDeleter.java:298)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
org.apache.lucene.index.IndexFileDeleter.deleteFiles(IndexFileDeleter.java:215)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
org.apache.lucene.index.IndexFileDeleter.deleteSegments(IndexFileDeleter.java:177)
DEBUG 12:59:09,993 debug.ThreadDump  -   at
org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:1582)
DEBUG 12:59:10,008 debug.ThreadDump  -   at
org.apache.lucene.index.IndexWriter.maybeMergeSegments(IndexWriter.java:1415)
DEBUG 12:59:10,008 debug.ThreadDump  -   at
org.apache.lucene.index.IndexWriter.flushRamSegments(IndexWriter.java:1352)
DEBUG 12:59:10,008 debug.ThreadDump  -   at
org.apache.lucene.index.IndexWriter.close(IndexWriter.java:588)

Once the searcher is closed from a seperate JVM/Server it frees the files
and the writer close can finish.

Has anyone else seen this behaviour?

I see it catches the IO exception on deletefiles in the indexwriter and puts
it in delete list for later. But this does not seem to happen on this
occasion. it just seems to hang

Any ideas on a way round this?

Regards,

Paul


-- 
View this message in context: http://old.nabble.com/Problem-with-close-IndexWriter-pausing-due-to-locked-files-tp26626826p26626826.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message