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 6AFA587E7 for ; Wed, 10 Aug 2011 07:28:00 +0000 (UTC) Received: (qmail 41116 invoked by uid 500); 10 Aug 2011 07:27:58 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 39700 invoked by uid 500); 10 Aug 2011 07:27:54 -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 39673 invoked by uid 99); 10 Aug 2011 07:27:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 07:27:51 +0000 X-ASF-Spam-Status: No, hits=-2000.8 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; Wed, 10 Aug 2011 07:27:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5B83BB4A4A for ; Wed, 10 Aug 2011 07:27:27 +0000 (UTC) Date: Wed, 10 Aug 2011 07:27:27 +0000 (UTC) From: "Simon Willnauer (JIRA)" To: dev@lucene.apache.org Message-ID: <499768658.23169.1312961247371.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1122092366.16568.1312811067297.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (LUCENE-3365) Create or Append mode determined before obtaining write lock 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-3365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Willnauer updated LUCENE-3365: ------------------------------------ Attachment: LUCENE-3365.patch hey Geoff, thanks for reporting and fixing this. I updated your patch to trunk (4.0) and simplyfied the testcase a little (no busy waiting etc) I am planning to commit this soon to trunk and backport to 3.x thanks! > Create or Append mode determined before obtaining write lock > ------------------------------------------------------------ > > Key: LUCENE-3365 > URL: https://issues.apache.org/jira/browse/LUCENE-3365 > Project: Lucene - Java > Issue Type: Bug > Components: core/index > Affects Versions: 3.1, 3.2, 3.3 > Reporter: Geoff Cooney > Assignee: Simon Willnauer > Labels: IndexWriter > Fix For: 3.4, 4.0 > > Attachments: LUCENE-3365.patch, LUCENE-3365.patch > > > If an IndexWriter("writer1") is opened in CREATE_OR_APPEND mode, it determines whether to CREATE or APPEND before obtaining the write lock. When another IndexWriter("writer2") is in the process of creating the index, this can result in writer1 entering create mode and then waiting to obtain the lock. When writer2 commits and releases the lock, writer1 is already in create mode and overwrites the index created by write2. > This bug was probably effected by LUCENE-2386 as prior to that Lucene generated an empty commit when a new index was created. I think the issue could still have occurred prior to that but the two IndexWriters would have needed to be opened nearly simultaneously and the first IndexWriter would need to release the lock before the second timed out. -- This message is automatically generated by JIRA. 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