[ http://issues.apache.org/jira/browse/LUCENE-690?page=comments#action_12443621 ] Grant Ingersoll commented on LUCENE-690: ----------------------------------------
Possibly reading wrong, but it seems like that invariant is not met by BufferedIndexInput, right? 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? This would be bad, b/c I don't see that it could recover from an empty buffer there when it thinks it has data. 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? > LazyField use of IndexInput not thread safe > ------------------------------------------- > > Key: LUCENE-690 > URL: http://issues.apache.org/jira/browse/LUCENE-690 > 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 copy. > 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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]