lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Cooney (JIRA)" <>
Subject [jira] [Updated] (LUCENE-3365) Create or Append mode determined before obtaining write lock
Date Tue, 09 Aug 2011 11:47:27 GMT


Geoff Cooney updated LUCENE-3365:

    Attachment: LUCENE-3365.patch

Patch containing junit test case and fix

> Create or Append mode determined before obtaining write lock
> ------------------------------------------------------------
>                 Key: LUCENE-3365
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 3.1, 3.2, 3.3
>            Reporter: Geoff Cooney
>            Priority: Minor
>              Labels: IndexWriter
>         Attachments: LUCENE-3365.patch
> If an IndexWriter("writer1") is opened in CREATE_OR_APPEND mode, it determines whether
to CREATE or APPEND before obtaining the write lock.  When another IndexWriter("writer2")
is in the process of creating the index, this can result in writer1 entering create mode and
then waiting to obtain the lock.  When writer2 commits and releases the lock, writer1 is already
in create mode and overwrites the index created by write2.
> This bug was probably effected by LUCENE-2386 as prior to that Lucene generated an empty
commit when a new index was created.  I think the issue could still have occurred prior to
that but the two IndexWriters would have needed to be opened nearly simultaneously and the
first IndexWriter would need to release the lock before the second timed out.

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