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

Michael McCandless commented on LUCENE-5934:
--------------------------------------------

I built a 4.0.0 index and copied forward to 4.x's TestBackwardsCompatibility, 
and the test fails with this:
{noformat}
java.io.IOException: file _0.si already exists
        at 
__randomizedtesting.SeedInfo.seed([DC4E59ED2DE3E60F:6D2FC24DAADD029A]:0)
        at 
org.apache.lucene.store.MockDirectoryWrapper.createOutput(MockDirectoryWrapper.java:552)
        at 
org.apache.lucene.index.SegmentInfos.write3xInfo(SegmentInfos.java:610)
        at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:535)
        at 
org.apache.lucene.index.SegmentInfos.prepareCommit(SegmentInfos.java:1033)
        at 
org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4560)
        at 
org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:3067)
        at 
org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3174)
        at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:916)
        at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:987)
        at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:957)
{noformat}

It's slightly different than what Ian saw because MDW catches earlier that 
something is wrong since we are supposed to be write-once.

But without MDW, we would create the output (overwriting the correct one from 
the index), then inside a try/finally we throw that IllegalStateExc, then in 
the finally clause we close that .si file and delete it.  So I suspect exactly 
one .si file is deleted from Ian's index, causing the corruption.

bq. Can we move it before we do anything destructive for additional safety?

We should definitely move up this check, after adding the missing indices to 
TestBackCompat.

> 4.10 broke backwards compatibility for 4.0 indexes
> --------------------------------------------------
>
>                 Key: LUCENE-5934
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5934
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/codecs, core/index
>    Affects Versions: 4.10
>            Reporter: Robert Muir
>            Priority: Blocker
>             Fix For: 4.10.1, 4.11, 5.0
>
>         Attachments: LUCENE-5934.patch
>
>
> As reported by Ian on the user list:
> Its trying to treat them as 3.x



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to