From java-dev-return-34534-apmail-lucene-java-dev-archive=lucene.apache.org@lucene.apache.org Mon Jun 15 13:38:19 2009 Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 21489 invoked from network); 15 Jun 2009 13:38:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jun 2009 13:38:18 -0000 Received: (qmail 95494 invoked by uid 500); 15 Jun 2009 13:38:29 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 95432 invoked by uid 500); 15 Jun 2009 13:38:29 -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 95404 invoked by uid 99); 15 Jun 2009 13:38:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 13:38:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2009 13:38:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5A874234C055 for ; Mon, 15 Jun 2009 06:38:07 -0700 (PDT) Message-ID: <918502591.1245073087357.JavaMail.jira@brutus> Date: Mon, 15 Jun 2009 06:38:07 -0700 (PDT) From: "Adrian Hempel (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1691) An index copied over another index can result in corruption In-Reply-To: <782271096.1245050767438.JavaMail.jira@brutus> 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-1691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Hempel updated LUCENE-1691: ---------------------------------- Fix Version/s: (was: 2.4.1) Affects Version/s: 2.4.1 > An index copied over another index can result in corruption > ----------------------------------------------------------- > > Key: LUCENE-1691 > URL: https://issues.apache.org/jira/browse/LUCENE-1691 > Project: Lucene - Java > Issue Type: Improvement > Components: Store > Affects Versions: 2.4.1 > Reporter: Adrian Hempel > Priority: Minor > > After restoring an older backup of an index over the top of a newer version of the index, attempts to open the index can result in CorruptIndexExceptions, such as: > {noformat} > Caused by: org.apache.lucene.index.CorruptIndexException: doc counts differ for segment _ed: fieldsReader shows 1137 but segmentInfo shows 1389 > at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:362) > at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:306) > at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:228) > at org.apache.lucene.index.MultiSegmentReader.(MultiSegmentReader.java:55) > at org.apache.lucene.index.ReadOnlyMultiSegmentReader.(ReadOnlyMultiSegmentReader.java:27) > at org.apache.lucene.index.DirectoryIndexReader$1.doBody(DirectoryIndexReader.java:102) > at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:653) > at org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:115) > at org.apache.lucene.index.IndexReader.open(IndexReader.java:316) > at org.apache.lucene.index.IndexReader.open(IndexReader.java:237) > {noformat} > The apparent cause is the strategy of taking the maximum of the ID in the segments.gen file, and the IDs of the apparently valid segment files (See lines 523-593 [here|http://svn.apache.org/viewvc/lucene/java/tags/lucene_2_4_1/src/java/org/apache/lucene/index/SegmentInfos.java?annotate=751393]), and using this as the current generation of the index. This will include "stale" segments that existed before the backup was restored. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org