[
https://issues.apache.org/jira/browse/LUCENE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17450122#comment-17450122
]
Robert Muir commented on LUCENE-10268:
--------------------------------------
So, if I patch the test to just use ASCII letters, it just gets insanely slow
(may never finish) on the very first test. Seems the smaller alphabet helps
provoke more of the sorting?
{noformat}
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java
b/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java
index 7be05292bce..2de2954d40e 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestFuzzyQuery.java
@@ -569,7 +569,7 @@ public class TestFuzzyQuery extends LuceneTestCase {
private String randomRealisticMultiByteUnicode(int length) {
while (true) {
// There is 1 single-byte unicode block, and 194 multi-byte blocks
- String value =
RandomizedTest.randomRealisticUnicodeOfCodepointLength(length);
+ String value = RandomizedTest.randomAsciiLettersOfLength(length);
if (value.charAt(0) > Byte.MAX_VALUE) {
return value;
}
{noformat}
I'll see if i can just produce a standalone ascii-letter-only unit test for
{{TestLevenshteinAutomata}} that reproduces the problem. I really don't think
determinization is the problem in this case, it seems to happen during initial
DFA construction. This way we can have something easier to work with.
> TestFuzzyQuery.testErrorMessage can sometimes run for a hundred seconds
> -----------------------------------------------------------------------
>
> Key: LUCENE-10268
> URL: https://issues.apache.org/jira/browse/LUCENE-10268
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Robert Muir
> Priority: Major
>
> 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)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]