lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
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  
GC'd.

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?

Mike

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: http://www.nabble.com/ThreadLocal-in-SegmentReader-tp18306230p18306230.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message