Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 5787 invoked from network); 26 May 2006 18:18:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 May 2006 18:18:17 -0000 Received: (qmail 56644 invoked by uid 500); 26 May 2006 18:18:14 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 56611 invoked by uid 500); 26 May 2006 18:18:14 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 56595 invoked by uid 99); 26 May 2006 18:18:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2006 11:18:14 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2006 11:18:13 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 251A67142D9 for ; Fri, 26 May 2006 18:17:30 +0000 (GMT) Message-ID: <26335602.1148667450148.JavaMail.jira@brutus> Date: Fri, 26 May 2006 18:17:30 +0000 (GMT+00:00) From: "Doug Cutting (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-485) IndexWriter.mergeSegments should not hold the commit lock while cleaning up. In-Reply-To: <1556968603.1136833881459.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-485?page=all ] Doug Cutting resolved LUCENE-485: --------------------------------- Fix Version: 2.0 Resolution: Fixed I committed this. Thanks, Luc! > IndexWriter.mergeSegments should not hold the commit lock while cleaning up. > ---------------------------------------------------------------------------- > > Key: LUCENE-485 > URL: http://issues.apache.org/jira/browse/LUCENE-485 > Project: Lucene - Java > Type: Improvement > Components: Index > Versions: CVS Nightly - Specify date in submission > Environment: checked in revision 367361 > Reporter: Luc Vanlerberghe > Fix For: 2.0.0 > Attachments: LUCENE-485.patch > > Same happens in IndexWriter.addIndexes(IndexReader[] readers). > The commit lock should be obtained whenever the Index structure/version is read or written. It should be kept for as short a period as possible. > The write lock is needed to make sure only one IndexWriter or IndexReader instance can update the index (multiple IndexReaders can of course use the index for searching). > The list of files that can be deleted is stored in the file "deletable". It is only read or written by the IndexWriter instance that holds the write lock, so there's no need to have the commit lock to to update it. > On my production system deleting the obsolete segment files after a mergeSegments() happens can occasionally take several seconds(!) and the commit lock blocks the searcher machines from updating their IndexReader instance. > Even on a standalone machine, the time to update the segments file is about 3ms, the time to delete the obsolete segments about 30ms. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org