Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0205D9895 for ; Thu, 1 Mar 2012 11:20:33 +0000 (UTC) Received: (qmail 57354 invoked by uid 500); 1 Mar 2012 11:20:31 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 57305 invoked by uid 500); 1 Mar 2012 11:20:31 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 57297 invoked by uid 99); 1 Mar 2012 11:20:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 11:20:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uwe@thetaphi.de designates 188.138.97.18 as permitted sender) Received: from [188.138.97.18] (HELO mail.sd-datasolutions.de) (188.138.97.18) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 11:20:24 +0000 Received: from VEGA (unknown [194.94.98.190]) by mail.sd-datasolutions.de (Postfix) with ESMTPSA id 6443C14AA066 for ; Thu, 1 Mar 2012 11:20:04 +0000 (UTC) From: "Uwe Schindler" To: References: <00fa01ccf799$e248a390$a6d9eab0$@thetaphi.de> In-Reply-To: Subject: RE: ThreadPool threads leaking to suite scope. Date: Thu, 1 Mar 2012 12:20:05 +0100 Message-ID: <010101ccf79d$412e6ef0$c38b4cd0$@thetaphi.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQD1AcSTBTfVQfWrMZxp5mujPhPBGgK7eUEjAnMuaXoBJLWiC5fSmt/A Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org Hi, Yeah it's strange. I checked the code: It either does wrap and runs = single-thread searches or it does *not* wrap and runs several threads. = So theoretically it should work correctly... We have to check, if all = IndexReaders are correctly closed and the listeners are called. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de > -----Original Message----- > From: dawid.weiss@gmail.com [mailto:dawid.weiss@gmail.com] On Behalf = Of > Dawid Weiss > Sent: Thursday, March 01, 2012 12:02 PM > To: dev@lucene.apache.org > Subject: Re: ThreadPool threads leaking to suite scope. >=20 > I don't know how to fix it, Uwe, but I know there's definitely = something not all > right with it because threads just keep accumulating (as new searchers = are > created). >=20 > I've pushed a static seed for which this is repeatable; this is a = heavily worked-on > branch but it may lead you to how to fix this: >=20 > git clone git://github.com/dweiss/lucene_solr.git > git checkout 935e1e9e9a350d6b35b23c4545caf78e82b42747 >=20 > try to run TestPhraseQuery (you'll need -ea in Eclipse). >=20 > Dawid >=20 > On Thu, Mar 1, 2012 at 11:55 AM, Uwe Schindler = wrote: > > 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 > > >=20 > --------------------------------------------------------------------- > 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