lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2720) IndexWriter should throw IndexFormatTooOldExc on open, not later during optimize/getReader/close
Date Sat, 23 Oct 2010 10:50:20 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924170#action_12924170
] 

Shai Erera commented on LUCENE-2720:
------------------------------------

And if we can arrange for addIndexes(Directory...) to throw that too, that would complete
the cycle I think. addIndexes(IndexReader) is not a problem, since if IR will detect that
upon open(), you shouldn't reach addIndexes(IR) at all.

To record here your proposal from LUCENE-2618 - one way to achieve that is to let segments_N
record the oldest version it contains. This is fine for 3.1 and onwards indexes, however what
do we do w/ 3.0 ones? We will need to distinguish >=3.1 and <3.1. However, <3.1 covers
both 3.0 (which we should support by 4.0) and 2.9 (which we shouldn't). Maybe this isn't a
problem because you cannot upgrade from 2.9 to 4.0 directly - you have to go through 3.x.

BTW Mike, I think we should track the version per-segment because only when all segments of
version X are gone, can the minimum version Y be recorded in segments_N. That is, if you have
several segments from version 1, and the index is on version 2, and you merge some of the
ver1 segments, the index's oldest version is still 1. However, if you record it only in segments_N,
how would you know when *all* ver1 segments are gone?

> 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


Mime
View raw message