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 17:45:36 GMT
    [ ] 
Yonik Seeley commented on LUCENE-690:

It seems to me like if you clone an object in an unknown state, you get another object in
an unknown state unless it's clone() is able to explicitly put it back into a known state.

Let's take TermDocs as an example of why it's use is OK:
SegmentTermDocs() *always* makes a clone of the SegmentReader's freqStream, and the SegmentReader
itself never directly uses the freqStream (and hence freqStream is used for nothing other
than cloneing).  
This analysis only takes into account SegmentTermDocs and SegmentReader... if there is another
class that directly uses SegmentReader.freqStream, then all bets are off again.

I don't know if all other clones() of IndexInput are safe, but it does seem like LazyField's
use is unsafe.

> 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