Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestIndexWriterMergePolicy.testStressUpdateSameDocumentWithMergeOnGetReader failure due to DWPT race condition #13352

Open
benwtrent opened this issue May 8, 2024 · 0 comments

Comments

@benwtrent
Copy link
Member

Description

This replicates rarely for me locally. To me this indicates a race condition instead of some logic error.

    java.lang.AssertionError: seqNo=114262 vs maxSeqNo=114261
        at __randomizedtesting.SeedInfo.seed([905AD19F00667602]:0)
        at org.apache.lucene.index.DocumentsWriterDeleteQueue.getNextSequenceNumber(DocumentsWriterDeleteQueue.java:567)
        at org.apache.lucene.index.DocumentsWriterDeleteQueue.add(DocumentsWriterDeleteQueue.java:178)
        at org.apache.lucene.index.DocumentsWriterDeleteQueue.add(DocumentsWriterDeleteQueue.java:155)
        at org.apache.lucene.index.DocumentsWriterPerThread.finishDocuments(DocumentsWriterPerThread.java:328)
        at org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments(DocumentsWriterPerThread.java:273)
        at org.apache.lucene.index.DocumentsWriter.updateDocuments(DocumentsWriter.java:425)
        at org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1558)
        at org.apache.lucene.index.IndexWriter.softUpdateDocuments(IndexWriter.java:1603)
        at org.apache.lucene.tests.index.RandomIndexWriter.updateDocument(RandomIndexWriter.java:315)
        at org.apache.lucene.index.TestIndexWriterMergePolicy.lambda$stressUpdateSameDocumentWithMergeOnX$4(TestIndexWriterMergePolicy.java:781)
        at java.base/java.lang.Thread.run(Thread.java:1583)

This is very similar to: elastic/elasticsearch#105122 (comment)

Either we are updating maxSeqNo incorrectly, or there is a race condition in DWPT that both tests have hit

Gradle command to reproduce

./gradlew test --tests TestIndexWriterMergePolicy.testStressUpdateSameDocumentWithMergeOnGetReader -Dtests.seed=905AD19F00667602 -Dtests.locale=chr-Cher-US -Dtests.timezone=MST7MDT -Dtests.asserts=true -Dtests.file.encoding=UTF-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant