Issue Details (XML | Word | Printable)

Key: LUCENE-1208
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Michael McCandless
Reporter: Michael McCandless
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Deadlock case in IndexWriter on exception just before flush

Created: 07/Mar/08 07:08 PM   Updated: 08/May/08 07:47 PM
Return to search
Component/s: Index
Affects Version/s: 2.3, 2.3.1
Fix Version/s: 2.3.2, 2.4

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works LUCENE-1208.patch 2008-03-07 07:11 PM Michael McCandless 2 kB

Lucene Fields: New
Resolution Date: 07/Mar/08 09:46 PM


 Description  « Hide
If a document hits a non-aborting exception, eg something goes wrong
in tokenStream.next(), and, that document had triggered a flush
(due to RAM or doc count) then DocumentsWriter will deadlock because
that thread marks the flush as pending but fails to clear it on
exception.

I have a simple test case showing this, and a fix fixing it.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #634831 Fri Mar 07 21:47:15 UTC 2008 mikemccand LUCENE-1208: if exception is hit after marking flushPending but before flushing, clear flushPending to prevent deadlock
Files Changed
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/index/DocumentsWriter.java
MODIFY /lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriter.java

Repository Revision Date User Message
ASF #635897 Tue Mar 11 12:18:26 UTC 2008 mikemccand LUCENE-1208 (porting to 2.3): fix deadlock case on hitting an exception while processing a document that had triggered a flush
Files Changed
MODIFY /lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/DocumentsWriter.java
MODIFY /lucene/java/branches/lucene_2_3/src/test/org/apache/lucene/index/TestIndexWriter.java
MODIFY /lucene/java/branches/lucene_2_3/CHANGES.txt