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 con
t 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 SegmentRead
; How about if we set termVectorsLocal itself to null? Will GC then "do
> the right thing", ie, recognize (eventually) that this ThreadLocal
> instance is no longer referenced, and clear all Objects for all
> threads that were held in it?
>
> Mike
>
> Roman
cal itself to null? Will GC then "do
> the right thing", ie, recognize (eventually) that this ThreadLocal
> instance is no longer referenced, and clear all Objects for all
> threads that were held in it?
>
> Mike
>
> Roman Puchkovskiy wrote:
>
>>
&
Well, this 'replacement' of the ThreadLocal does not solve the initial
problem. As there's always at least one ThreadLocal which binds the object
loaded by the web-app to the Thread which is _not_ loaded by the web-app,
the classloader never may be unloaded.
You are right, this is not the 'leak'