lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (LUCENE-690) LazyField use of IndexInput not thread safe
Date Thu, 19 Oct 2006 19:26:37 GMT
    [ ] 
Yonik Seeley commented on LUCENE-690:

: If clone was called while the IndexInput was in the refill() operation before readInternal()
was called but after the buffer was allocated (i.e. line 64) and then clone finished it would
copy an empty buffer on line 103, right?

Correct.  BufferedIndexInput also has multiple "pointers", and in the absense of synchronization,
you can't guarantee the order that things will be flushed back to memory.

: So, I guess that would argue that it is not safe and that we should aggressively clone (b/c
we know it is in a good state) or that we should synchronize, right?

Right, you either never use what you are cloning, or you synchronize.

> LazyField use of IndexInput not thread safe
> -------------------------------------------
>                 Key: LUCENE-690
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 2.0.1
>            Reporter: Yonik Seeley
> Hypothetical problem: IndexInput.clone() of an active IndexInput could result in a corrupt
> LazyField clones the FieldsReader.fieldsStream, which could be in use via IndexReader.document()

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


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

View raw message