Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 64328 invoked from network); 23 Oct 2010 11:18:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Oct 2010 11:18:45 -0000 Received: (qmail 3788 invoked by uid 500); 23 Oct 2010 11:18:44 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 3566 invoked by uid 500); 23 Oct 2010 11:18:41 -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 3558 invoked by uid 99); 23 Oct 2010 11:18:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Oct 2010 11:18:40 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Oct 2010 11:18:39 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9NBIJnf029158 for ; Sat, 23 Oct 2010 11:18:19 GMT Message-ID: <14629860.41351287832699025.JavaMail.jira@thor> Date: Sat, 23 Oct 2010 07:18:19 -0400 (EDT) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2720) IndexWriter should throw IndexFormatTooOldExc on open, not later during optimize/getReader/close In-Reply-To: <26104340.40921287828259171.JavaMail.jira@thor> 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-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924178#action_12924178 ] Uwe Schindler commented on LUCENE-2720: --------------------------------------- bq. Actually we need only to distinguish 2.x vs 3.x right? I think we can just use the stored fields file, since it changed as of 3.0? We discussed this in IRC shortly before: To detect a pre-3.0 index, it's enough to read the StoredFields file (is it really *always* available?). So 3.x and 4.0 do the following in the ctors/open: - if segments file is 3.x format, it contains information about util.Version -> we are fine no more work. In 4.0 we are happy with the index - Only trunk: if segments file is older format, read the StoredFields file in ctor. This would throw IndexFormatTooOldEx in 4.0 (this is additional work, if stored fields are not needed, but neglectible). Once the index is modified, we know about Once an index is modified with 3.x or 4.0 we always update the version and write new segment information. For older segments, this code also has to inspect the stored fields file, to detect if segment is pre-3.x. This is done exatctly once during update of segments_N. > IndexWriter should throw IndexFormatTooOldExc on open, not later during optimize/getReader/close > ------------------------------------------------------------------------------------------------ > > Key: LUCENE-2720 > URL: https://issues.apache.org/jira/browse/LUCENE-2720 > Project: Lucene - Java > Issue Type: Bug > Components: Index > Reporter: Michael McCandless > Fix For: 3.1, 4.0 > > > Spinoff of LUCENE-2618 and also related to the original issue LUCENE-2523... > If you open IW on a too-old index, you don't find out until much later that the index is too old. > This is because IW does not go and open segment readers on all segments. It only does so when it's time to apply deletes, do merges, open an NRT reader, etc. > This is a serious bug because you can in fact succeed in committing with the new major version of Lucene against your too-old index, which is catastrophic because suddenly the old Lucene version will no longer open the index, and so your index becomes unusable. -- 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org