lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Semantics of a closed IndexInput
Date Mon, 03 Apr 2006 21:59:47 GMT
Grant Ingersoll wrote:
> Should it be the case that you can clone a closed IndexInput and get a 
> valid object that is capable of reading?  B/c this is what I am seeing 
> in my Lazy implementation (note, it seems to work fine...)  I am just 
> not sure if it should work or if it is a bug.

Cloned IndexInputs are assumed to share resources with the original. 
Lucene closes all original IndexInputs when the IndexReader is closed. 
Cloned IndexInputs should not be used after the IndexReader is closed. 
I don't think we bother to explicitly close clones (as they are 
frequently cached in ThreadLocals, etc.).


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

View raw message