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 2BF3584F5 for ; Wed, 10 Aug 2011 13:35:52 +0000 (UTC) Received: (qmail 14824 invoked by uid 500); 10 Aug 2011 13:35:50 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 14759 invoked by uid 500); 10 Aug 2011 13:35:49 -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 14752 invoked by uid 99); 10 Aug 2011 13:35:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 13:35:49 +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 13:35: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 22ECEB5A20 for ; Wed, 10 Aug 2011 13:35:28 +0000 (UTC) Date: Wed, 10 Aug 2011 13:35:28 +0000 (UTC) From: "Geoff Cooney (JIRA)" To: dev@lucene.apache.org Message-ID: <1132168304.23681.1312983328139.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1122092366.16568.1312811067297.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (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 [ https://issues.apache.org/jira/browse/LUCENE-3365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082330#comment-13082330 ] Geoff Cooney commented on LUCENE-3365: -------------------------------------- Glad I could help! > 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