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 7671F7E42 for ; Tue, 13 Dec 2011 13:52:01 +0000 (UTC) Received: (qmail 42354 invoked by uid 500); 13 Dec 2011 13:52:00 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 42296 invoked by uid 500); 13 Dec 2011 13:52:00 -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 42288 invoked by uid 99); 13 Dec 2011 13:52:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 13:52:00 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 13:51:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CFF0C110703 for ; Tue, 13 Dec 2011 13:51:30 +0000 (UTC) Date: Tue, 13 Dec 2011 13:51:30 +0000 (UTC) From: "Michael McCandless (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <909520302.5716.1323784290853.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1749677291.5566.1323780930685.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3644) problems with IR's readerFinishedListener MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168386#comment-13168386 ] Michael McCandless commented on LUCENE-3644: -------------------------------------------- That's a good idea: separate APIs for "core closed event" and "composite reader closed event". > problems with IR's readerFinishedListener > ----------------------------------------- > > Key: LUCENE-3644 > URL: https://issues.apache.org/jira/browse/LUCENE-3644 > Project: Lucene - Java > Issue Type: Bug > Reporter: Robert Muir > Fix For: 3.6, 4.0 > > > There are two major problems: > 1. The listener api does not really apply all indexreaders. for example segmentreaders dont fire it on close, only segmentcorereaders. this is wrong, a segmentcorereader is *not* an indexreader. Furthermore, if you register it on a top-level reader you get events for anything under the reader tree (sometimes, unless they are segmentreaders as mentioned above, where it doesnt work correctly at all). > 2. Furthermore your listener is 'passed along' in a viral fashion from clone() and reopen(). This means for example, if you are trying to listen to readers in NRT search you are just accumulating reader listeners, all potentially keeping references to old indexreaders (because, in order to deal with #1 your listener must 'keep' a reference to the IR it was registered on, so it can check if thats *really* the one). > We should discuss how to fix #1. > I will create a patch for #2 shortly and commit it, its just plain wrong. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org