lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3348) IndexWriter applies wrong deletes during concurrent flush-all
Date Fri, 05 Aug 2011 07:40:27 GMT


Simon Willnauer commented on LUCENE-3348:

I think I now know what is causing the failure here. In IW#prepareCommit(Map) we release the
full flush (docWriter.finishFullFlush(success);) before we apply the deletes. This means that
another thread can start flushing and freeze & push its global deletes into the BufferedDeleteStream
before we call IW#maybeApplyDeletes(). if a flush is fast enough (small segment) and something
else causes the committing thread to wait on the IW in order to apply the deletes a del-packet
could sneak in not belonging to the commit. I IW#getReader this is already handled correctly.

> IndexWriter applies wrong deletes during concurrent flush-all
> -------------------------------------------------------------
>                 Key: LUCENE-3348
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.4, 4.0
>         Attachments: LUCENE-3348.patch, LUCENE-3348.patch, LUCENE-3348.patch, LUCENE-3348.patch,
fail.txt.bz2, fail2.txt.bz2
> Yonik uncovered this with the TestRealTimeGet test: if a flush-all is
> underway, it is possible for an incoming update to pick a DWPT that is
> stale, ie, not yet pulled/marked for flushing, yet the DW has cutover
> to a new deletes queue.  If this happens, and the deleted term was
> also updated in one of the non-stale DWPTs, then the wrong document is
> deleted and the test fails by detecting the wrong value.
> There's a 2nd failure mode that I haven't figured out yet, whereby 2
> docs are returned when searching by id (there should only ever be 1
> doc since the test uses updateDocument which is atomic wrt
> commit/reopen).
> Yonik verified the test passes pre-DWPT, so my guess is (but I
> have yet to verify) this test also passes on 3.x.  I'll backport
> the test to 3.x to be sure.

This message is automatically generated by JIRA.
For more information on JIRA, see:


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

View raw message