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 47E119968 for ; Fri, 10 Feb 2012 21:05:25 +0000 (UTC) Received: (qmail 83144 invoked by uid 500); 10 Feb 2012 21:05:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 83039 invoked by uid 500); 10 Feb 2012 21:05:23 -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 83032 invoked by uid 99); 10 Feb 2012 21:05:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2012 21:05:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Fri, 10 Feb 2012 21:05:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 82BBF1AF2FE for ; Fri, 10 Feb 2012 21:04:59 +0000 (UTC) Date: Fri, 10 Feb 2012 21:04:59 +0000 (UTC) From: "Michael McCandless (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <689072652.25940.1328907899537.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1811760068.15421.1328719859324.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3761) Generalize SearcherManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205753#comment-13205753 ] Michael McCandless commented on LUCENE-3761: -------------------------------------------- Hmm, but how to protect swapThingy in one thread while close() is called in another? > Generalize SearcherManager > -------------------------- > > Key: LUCENE-3761 > URL: https://issues.apache.org/jira/browse/LUCENE-3761 > Project: Lucene - Java > Issue Type: Improvement > Components: core/search > Reporter: Shai Erera > Assignee: Shai Erera > Priority: Minor > Fix For: 3.6, 4.0 > > Attachments: LUCENE-3761.patch, LUCENE-3761.patch > > > I'd like to generalize SearcherManager to a class which can manage instances of a certain type of interfaces. The reason is that today SearcherManager knows how to handle IndexSearcher instances. I have a SearcherManager which manages a pair of IndexSearcher and TaxonomyReader pair. > Recently, few concurrency bugs were fixed in SearcherManager, and I realized that I need to apply them to my version as well. Which led me to think why can't we have an SM version which is generic enough so that both my version and Lucene's can benefit from? > The way I see SearcherManager, it can be divided into two parts: (1) the part that manages the logic of acquire/release/maybeReopen (i.e., ensureOpen, protect from concurrency stuff etc.), and (2) the part which handles IndexSearcher, or my SearcherTaxoPair. I'm thinking that if we'll have an interface with incRef/decRef/tryIncRef/maybeRefresh, we can make SearcherManager a generic class which handles this interface. > I will post a patch with the initial idea, and we can continue from there. -- 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