AssertionError triggered in IndexWriter.filesExist [LUCENE-4699]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Occasionally I get this AssertionError in my unit tests:
java.lang.AssertionError: file _0_Lucene40_0.tim does not exist
at org.apache.lucene.index.IndexWriter.filesExist(IndexWriter.java:3981)
at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4047)
at org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:2800)
at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2875)
at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2855)
at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2839)
I'm not sure what's supposed to trigger this. To fix this I just rerun my tests and the error is gone.
I believe it's probably caused by something I'm doing wrong, but I was hoping to get some kind of declared exception and not an assertion error.
---
Migrated from [LUCENE-4699](https://issues.apache.org/jira/browse/LUCENE-4699) by Raimund Merkert
Contributor guide
Research direction
Start with IndexWriter.filesExist and the commit path shown in the stack trace; reproduce the intermittent failure in the unit tests and inspect why _0_Lucene40_0.tim is missing. Compare the observed behavior with the requested declared exception, and document a reproducible trigger and expected handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100