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

Tim Smith commented on LUCENE-5492:
-----------------------------------

Here's what my test is doing:

1. unpacks lucene 3.x era index (has one segment in it)
2. opens IndexWriter on 3.x index
3. opens DirectoryReader using IndexWriter
4. Add 1 new document
5. commit IndexWriter
6. reopens DirectoryReader using IndexWriter
7. optimizes IndexWriter
8. commit optimized index
9. reopens DirectoryReader using IndexWriter

One thing of note is that i have a custom IndexDeletionPolicy
this policy will hold onto "named" commit points 
i hold onto the previous commit point at commit time, and then release it 
shortly after the commit is finished, once i have persisted my acceptance of 
the new commit point (calling deleteUnusedFiles() to purge it)




> 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
>            Assignee: Michael McCandless
>
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to