You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tim Smith (JIRA)" <ji...@apache.org> on 2014/03/05 22:18:50 UTC

[jira] [Comment Edited] (LUCENE-5492) IndexFileDeleter AssertionError in presence of *_upgraded.si files

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

Tim Smith edited comment on LUCENE-5492 at 3/5/14 9:18 PM:
-----------------------------------------------------------

The following FileNotFound exception is firing:
{code}
java.io.FileNotFoundException: target/data-16000/mockEngine/index/_0.si (No such file or directory)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
        at org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java:382)
        at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.<init>(NIOFSDirectory.java:127)
        at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:80)
        at org.apache.lucene.codecs.lucene3x.Lucene3xSegmentInfoReader.read(Lucene3xSegmentInfoReader.java:103)
        at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:340)
        at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:175)
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:773)
{code}

this results in IndexFileDeleter ignoring the segment (skipping incRef()), resulting in 0 refcounts for said files

then, the CommitPoint is deleted (which does reference the files properly), and the files are decRef'd, resulting in the exception


was (Author: tsmith):
The following FileNotFound exception is firing:
{code}
java.io.FileNotFoundException: /home/tsmith/src/attivio/app/target/data-16000/mockEngine/index/_0.si (No such file or directory)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
        at org.apache.lucene.store.FSDirectory$FSIndexInput.<init>(FSDirectory.java:382)
        at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.<init>(NIOFSDirectory.java:127)
        at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:80)
        at org.apache.lucene.codecs.lucene3x.Lucene3xSegmentInfoReader.read(Lucene3xSegmentInfoReader.java:103)
        at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:340)
        at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:175)
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:773)
{code}

this results in IndexFileDeleter ignoring the segment (skipping incRef()), resulting in 0 refcounts for said files

then, the CommitPoint is deleted (which does reference the files properly), and the files are decRef'd, resulting in the exception

> IndexFileDeleter AssertionError in presence of *_upgraded.si files
> ------------------------------------------------------------------
>
>                 Key: LUCENE-5492
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5492
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.7
>            Reporter: Tim Smith
>
> When calling IndexWriter.deleteUnusedFiles against an index that contains 3.x segments, i am seeing the following exception:
> {code}
> java.lang.AssertionError: failAndDumpStackJunitStatment: RefCount is 0 pre-decrement for file "_0_upgraded.si"
>         at org.apache.lucene.index.IndexFileDeleter$RefCount.DecRef(IndexFileDeleter.java:630)
>         at org.apache.lucene.index.IndexFileDeleter.decRef(IndexFileDeleter.java:514)
>         at org.apache.lucene.index.IndexFileDeleter.deleteCommits(IndexFileDeleter.java:286)
>         at org.apache.lucene.index.IndexFileDeleter.revisitPolicy(IndexFileDeleter.java:393)
>         at org.apache.lucene.index.IndexWriter.deleteUnusedFiles(IndexWriter.java:4617)
> {code}
> I believe this is caused by IndexFileDeleter not being aware of the Lucene3x Segment Infos Format (notably the _upgraded.si files created to "upgrade" an old index)
> This is new in 4.7 and did not occur in 4.6.1
> Still trying to track down a workaround/fix



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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