Issue Details (XML | Word | Printable)

Key: LUCENE-1429
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

close() throws incorrect IllegalStateEx after IndexWriter hit an OOME when autoCommit is true

Created: 28/Oct/08 11:03 AM   Updated: 25/Sep/09 04:23 PM
Return to search
Component/s: None
Affects Version/s: 2.3, 2.3.1, 2.3.2, 2.4
Fix Version/s: 2.4.1, 2.9

Time Tracking:
Not Specified

Lucene Fields: New
Resolution Date: 19/Feb/09 09:32 AM


 Description  « Hide
Spinoff from http://www.nabble.com/IllegalStateEx-thrown-when-calling-close-to20201825.html

When IndexWriter hits an OOME, it records this and then if close() is
called it calls rollback() instead. This is a defensive measure, in
case the OOME corrupted the internal buffered state (added/deleted
docs).

But there's a bug: if you opened IndexWriter with autoCommit true,
close() then incorrectly throws an IllegalStatException.

This fix is simple: allow rollback to be called even if autoCommit is
true, internally during close. (External calls to rollback with
autoCommmit true is still not allowed).



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael McCandless added a comment - 28/Oct/08 12:09 PM
Thanks Jed!

Jed Wesley-Smith added a comment - 28/Oct/08 11:15 PM
Thanks Michael, I'll try and work out the best policy for the client code that should notice OOME and react appropriately.

Michael McCandless added a comment - 19/Feb/09 01:37 AM
Reopening for backport to 2.4.1.

Michael McCandless added a comment - 19/Feb/09 09:32 AM
Committed revision 745788 on 2.4 branch.