lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: ThreadLocal in SegmentReader
Date Mon, 07 Jul 2008 10:50:17 GMT

Well ... if the thread dies, the value in its ThreadLocal should be  

If the thread does not die (eg thread pool in an app server) then the  
ThreadLocal value remains, but that value is a shallow clone of the  
original TermVectorsReader and should not be consuming that much RAM  
per thread.

So I think it's OK?


Roman Puchkovskiy wrote:

> Hi.
> There's a ThreadLocal field in SegmentReader (it's called  
> termVectorsLocal).
> Some value is put to it, but it's never cleared.
> Is it ok? It looks like sometimes this behavior may lead to leaks.
> This is the same in lucene-2.2.0 and lucene-2.3.2.
> Thanks in advance.
> -- 
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message