apache / apache/lucene

TestDoc failure [LUCENE-8096]

Open
#9,144 0 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

ant test -Dtestcase=TestDoc -Dtests.method=testIndexAndMerge -Dtests.seed=8E42CE481D9FEA92 -Dtests.slow=true -Dtests.locale=es-CO -Dtests.timezone=Pacific/Fiji -Dtests.asserts=true -Dtests.file.encoding=US-ASCII

[junit4] ERROR 0.18s J0 | TestDoc.testIndexAndMerge <<<
[junit4] > Throwable #1: java.io.IOException: file "_merge3.fdx" was already written to
[junit4] > at __randomizedtesting.SeedInfo.seed([8E42CE481D9FEA92:E7185A13B36323A7]:0)
[junit4] > at org.apache.lucene.store.MockDirectoryWrapper.createOutput(MockDirectoryWrapper.java:654)
[junit4] > at org.apache.lucene.store.TrackingDirectoryWrapper.createOutput(TrackingDirectoryWrapper.java:43)
[junit4] > at org.apache.lucene.codecs.compressing.CompressingStoredFieldsWriter.<init>(CompressingStoredFieldsWriter.java:113)
[junit4] > at org.apache.lucene.codecs.compressing.CompressingStoredFieldsFormat.fieldsWriter(CompressingStoredFieldsFormat.java:128)
[junit4] > at org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat.fieldsWriter(Lucene50StoredFieldsFormat.java:183)
[junit4] > at org.apache.lucene.codecs.asserting.AssertingStoredFieldsFormat.fieldsWriter(AssertingStoredFieldsFormat.java:48)
[junit4] > at org.apache.lucene.index.SegmentMerger.mergeFields(SegmentMerger.java:213)
[junit4] > at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:103)
[junit4] > at org.apache.lucene.index.TestDoc.merge(TestDoc.java:227)
[junit4] > at org.apache.lucene.index.TestDoc.testIndexAndMerge(TestDoc.java:188)
[junit4] > at java.lang.Thread.run(Thread.java:748)

---
Migrated from [LUCENE-8096](https://issues.apache.org/jira/browse/LUCENE-8096) by Adrien Grand (@jpountz)

Contributor guide

Open the contributing guide

Research direction

Start by running the reported ant test command with seed 8E42CE481D9FEA92. Inspect TestDoc.testIndexAndMerge and TestDoc.merge at the reported stack-trace locations, then trace the duplicate _merge3.fdx creation through MockDirectoryWrapper.createOutput. Done means the failure is understood and the test no longer reports that the file was already written.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.