You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2015/02/22 01:18:11 UTC

[jira] [Updated] (LUCENE-6279) 3.x -> 4.x .si upgrade should not be tricked by leftover upgrade marker file

     [ https://issues.apache.org/jira/browse/LUCENE-6279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-6279:
---------------------------------------
    Attachment: LUCENE-6279.patch

Test case showing the issue (applies to 4.10.x); the test fails with this:

{noformat}

java.io.FileNotFoundException: _0.si in dir=RAMDirectory@3833bc67 lockFactory=org.apache.lucene.store.SingleInstanceLockFactory@69b2486e
	at __randomizedtesting.SeedInfo.seed([1598963DC9C89C28:2D64E0AACDD85FF7]:0)
	at org.apache.lucene.store.MockDirectoryWrapper.openInput(MockDirectoryWrapper.java:603)
	at org.apache.lucene.codecs.lucene3x.Lucene3xSegmentInfoReader.read(Lucene3xSegmentInfoReader.java:106)
	at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:358)
	at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:454)
	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:906)
	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:752)
	at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:457)
	at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:414)
	at org.apache.lucene.util.TestUtil.checkIndex(TestUtil.java:207)
	at org.apache.lucene.store.MockDirectoryWrapper.close(MockDirectoryWrapper.java:724)
	at org.apache.lucene.index.TestBackwardsCompatibility3x.testLeftoverUpgradedFile(TestBackwardsCompatibility3x.java:1038)
{noformat}


> 3.x -> 4.x .si upgrade should not be tricked by leftover upgrade marker file
> ----------------------------------------------------------------------------
>
>                 Key: LUCENE-6279
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6279
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 4.10.x
>
>         Attachments: LUCENE-6279.patch
>
>
> Today when you do the first IW.commit to a 3.x index from Lucene 4.x, we go
> through a per-segment upgrade process when writing the next segments_N
> file, writing .si files for each segment if we didn't already do so.
> However, this process can be fooled by a leftover _N_upgraded.si
> file, in case the app above Lucene wasn't careful and reused a
> directory that had leftover files... I think we can make this more
> robust.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org