[
http://issues.apache.org/jira/browse/LUCENE-690?page=comments#action_12443628 ]
Yonik Seeley commented on LUCENE-690:
-------------------------------------
On 10/19/06, Ning Li <[EMAIL PROTECTED]> wrote:
> What makes, for example, FSIndexInput and its clones, thread-safe is
> the following.
> That is, the method is synchronized on the file object.
>
> protected void readInternal(byte[] b, int offset, int len)
> throws IOException {
> synchronized (file) {
I don't think that's sufficient in part because the IndexInput's state is
manipulated outside that sync block. The sync block is to protect the file
only, not the IndexInput, which isn't thread-safe (by design).
Look at BufferedIndexInput.seek() and BufferedIndexInput.refill()
> 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]