[jira] [Commented] (LUCENE-5263) Deletes may be silently lost if an IOException is hit and later not hit (e.g., disk fills up and then frees up)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (LUCENE-5263) Deletes may be silently lost if an IOException is hit and later not hit (e.g., disk fills up and then frees up)

Nick Burch (Jira)

    [ https://issues.apache.org/jira/browse/LUCENE-5263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13789159#comment-13789159 ]

Shai Erera commented on LUCENE-5263:
------------------------------------

Patch looks great.

* I like IOUtils.reThrow - takes away a lot of code :).
* There's a typo I think in FakeIOException: {{@code _u_IOException}}
* You call iwc.setMergeScheduler() twice in a raw -- I believe it's an error from my example above.

I will separately look at adding field updates to the test by randomly delete/update/both (I'll do it under LUCENE-5189).

+1 to commit.

> Deletes may be silently lost if an IOException is hit and later not hit (e.g., disk fills up and then frees up)
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5263
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5263
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.6
>
>         Attachments: LUCENE-5263.patch, LUCENE-5263.patch
>
>
> This case is tricky to handle, yet I think realistic: disk fills up
> temporarily, causes an exception in writeLiveDocs, and then the app
> keeps using the IW instance.
> Meanwhile disk later frees up again, IW is closed "successfully".  In
> certain cases, we can silently lose deletes in this case.
> I had already committed
> TestIndexWriterDeletes.testNoLostDeletesOnDiskFull, and Jenkins seems
> happy with it so far, but when I added fangs to the test (cutover to
> RandomIndexWriter from IndexWriter, allow IOE during getReader, add
> randomness to when exc is thrown, etc.), it uncovered some real/nasty
> bugs:
>   * ReaderPool.dropAll was suppressing any exception it hit, because
>     {code}if (priorE != null){code} should instead be {code}if (priorE == null){code}
>   * After a merge, we have to write deletes before committing the
>     segment, because an exception when writing deletes means we need
>     to abort the merge
>   * Several places that were directly calling deleter.checkpoint must
>     also increment the changeCount else on close IW thinks there are
>     no changes and doesn't write a new segments file.
>   * closeInternal was dropping pooled readers after writing the
>     segments file, which would lose deletes still buffered due to a
>     previous exc.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]