lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: ThreadPool threads leaking to suite scope.
Date Thu, 01 Mar 2012 10:55:58 GMT
I think the problem in newSearcher ist hat sometimes the reader is wrapped. If its wrapped,
the underlying reader is only closed, not the wrapper. But the listener is added to the wrapper.
We should add the listener to the original inner reader.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Dawid Weiss [mailto:dawid.weiss@gmail.com]
> Sent: Thursday, March 01, 2012 11:51 AM
> To: dev@lucene.apache.org
> Subject: Re: ThreadPool threads leaking to suite scope.
> 
> > 1) initialize threads eagerly; use ThreadPoolExecutor and call
> > prestartAllCoreThreads. this could be applied to LTC on the trunk.
> 
> I did this but threads still leak out from unclosed readers created by
> LTC#newSearcher. I don't know why, but this isn't called --
> 
>        r.addReaderClosedListener(new ReaderClosedListener() {
>          @Override
>          public void onClose(IndexReader reader) {
>            shutdownExecutorService(ex);
>          }
>        });
> 
> Clues?
> 
> Dawid
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


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


Mime
View raw message