lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Resolved: (LUCENE-1191) If IndexWriter hits OutOfMemoryError it should not commit
Date Thu, 28 Feb 2008 21:35:51 GMT


Michael McCandless resolved LUCENE-1191.

    Resolution: Fixed

> If IndexWriter hits OutOfMemoryError it should not commit
> ---------------------------------------------------------
>                 Key: LUCENE-1191
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1, 2.4
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>         Attachments: LUCENE-1191.patch
> While progress has been made making IndexWriter robust to OOME, I
> think there is still a real risk that an OOME at a bad time could put
> IndexWriter into a bad state such that if close() is called and
> somehow it succeeds without hitting another OOME, it risks
> introducing messing up the index.
> I'd like to detect if OOME has been hit in any of the methods that
> alter IW's state, and if so, do not commit changes to the index.  If
> close is called after hitting OOME, I think writer should instead
> abort.
> Attached patch just adds try/catch clauses to catch OOME, note that
> it was hit, and re-throw it.  Then, sync() refuses to commit a new
> segments_N if OOME was hit, and close instead calls abort when OOME
> was hit.  All tests pass.  I plan to commit in a day or two.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message