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 5F5FDCE77 for ; Mon, 11 Jun 2012 12:09:46 +0000 (UTC) Received: (qmail 91331 invoked by uid 500); 11 Jun 2012 12:09:45 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 91279 invoked by uid 500); 11 Jun 2012 12:09:45 -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 91264 invoked by uid 99); 11 Jun 2012 12:09:44 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2012 12:09:44 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id BFC14142863 for ; Mon, 11 Jun 2012 12:09:44 +0000 (UTC) Date: Mon, 11 Jun 2012 12:09:44 +0000 (UTC) From: "Shai Erera (JIRA)" To: dev@lucene.apache.org Message-ID: <185685738.2604.1339416584787.JavaMail.jiratomcat@issues-vm> In-Reply-To: <586091106.3256.1337155862454.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (LUCENE-4061) Improvements to DirectoryTaxonomyWriter (synchronization and others) 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-4061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shai Erera updated LUCENE-4061: ------------------------------- Attachment: LUCENE-4061.patch Fixing the concurrency issue was hairy, and required lots of changes to DirTaxoWriter: * Needed a ReaderManager, so added such in core under o.a.l.index. Separately, I think that we should move RefManager to o.a.l.util instead of o.a.l.search. * DirTaxoWriter was not very well built for concurrency :), so many changes had to be done to it. * TaxoWriterCache.hasRoom(int) has been replaced by isFull(). * TestDirTaxoWriter has been enhanced to sometimes, during nightly builds, use a NoOpCache, as it uncovered some bugs too ! (yet it makes the test horribly slow, hence why the nightly criteria, and very low chances still). I ran DirTaxoWriter.testConcurrency over 1000 times and no failures, so I'm inclined to believe the concurrency issues are now resolved. Still, a second (and third and even a forth) look by someone else would be appreciated. I'll commit it tomorrow if no one will object, and port to 4x. > Improvements to DirectoryTaxonomyWriter (synchronization and others) > -------------------------------------------------------------------- > > Key: LUCENE-4061 > URL: https://issues.apache.org/jira/browse/LUCENE-4061 > Project: Lucene - Java > Issue Type: Improvement > Components: modules/facet > Reporter: Shai Erera > Assignee: Shai Erera > Fix For: 4.0 > > Attachments: LUCENE-4061.patch, LUCENE-4061.patch > > > DirTaxoWriter synchronizes in too many places. For instance addCategory() is fully synchronized, while only a small part of it needs to be. > Additionally, getCacheMemoryUsage looks bogus - it depends on the type of the TaxoWriterCache. No code uses it, so I'd like to remove it -- whoever is interested can query the specific cache impl it has. Currently, only Cl2oTaxoWriterCache supports it. > If the changes will be simple, I'll port them to 3.6.1 as well. -- 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