TestFuzzyQuery.testErrorMessage can sometimes run for a hundred seconds [LUCENE-10268]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I ran 6 test runs, and it happened only in one of them:
97.93s TestFuzzyQuery.testErrorMessage (:lucene:core)
The test is badly named, but I think the intention is to provoke a determinize work limit. Funny because with the lev logic we build a DFA from the getgo... so it's just the overhead introduced by UTF32toUTF8.
Still, this seems to indicate something is wrong, or possible adversary.
To reproduce:
commit hash: 63c89f678d48deb9a40b90498409ad5656d775ce
"git checkout 63c89f678d48deb9a40b90498409ad5656d775ce"
57.51 second seed: 4DE463858ECD6FA6
reproduce with: ./gradlew -p lucene/core test --tests TestFuzzyQuery.testErrorMessage -Dtests.seed=4DE463858ECD6FA6
52.95 second seed: 7DE4CCA6F3A8183
reproduce with: ./gradlew -p lucene/core test --tests TestFuzzyQuery.testErrorMessage -Dtests.seed=7DE4CCA6F3A8183
48.21 second seed: 79F0E067AF13B395
reproduce with: ./gradlew -p lucene/core test --tests TestFuzzyQuery.testErrorMessage -Dtests.seed=79F0E067AF13B395
I used jdk-17:
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12)
OpenJDK 64-Bit Server VM (build 17.0.1+12, mixed mode)
---
Migrated from [LUCENE-10268](https://issues.apache.org/jira/browse/LUCENE-10268) by Robert Muir (@rmuir), updated Nov 29 2021
Attachments: [LUCENE-10268_test.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-10268/LUCENE-10268_test.patch)
Contributor guide
Research direction
Start with TestFuzzyQuery.testErrorMessage and reproduce it from commit 63c89f678d48deb9a40b90498409ad5656d775ce using the provided Gradle command and seeds. Trace the determinize work-limit path and the UTF32toUTF8 overhead described in the issue, then establish why the test can take nearly 100 seconds and verify that it completes reliably without the reported delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100