[ http://issues.apache.org/jira/browse/LUCENE-690?page=comments#action_12443600 ] Grant Ingersoll commented on LUCENE-690: ----------------------------------------
Defnitely an issue for a closed IndexInput, but that has been discussed elsewhere and there isn't really anything satisfying to say there other than it is undeclared what will happen (although my tests on local Directories indicate that it is "safe" in a simple environment). Otherwise, my understanding is that the seek() call before reading should put it into a known state, but I am guessing your not so sure on that point. So the question is seek() sufficient to put an IndexInput into a known safe state, right? If it doesn't, what would you suggest for a fix? I suppose maybe you could clone it as you create the LazyField (which would put it in right at the correct position and there would be no need to seek, right) This would save a little time at the tradeoff of memory, 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]