Skip to content

Conversation

@dweiss
Copy link
Contributor

@dweiss dweiss commented Jan 2, 2026

We get occasional exceptions in tests like this one:
https://jenkins.thetaphi.de/job/Lucene-nightly-main-Linux/1070/console

org.apache.lucene.index.TestIndexFileDeleter > test suite's output saved to /home/jenkins/workspace/Lucene-nightly-main-Linux/lucene/core/build/test-results/test/outputs/OUTPUT-org.apache.lucene.index.TestIndexFileDeleter.txt, copied below:
   >     org.apache.lucene.store.AlreadyClosedException: ReaderPool is already closed
   >         at __randomizedtesting.SeedInfo.seed([807AD80E9847078:E19ADAB29F4D9785]:0)
   >         at app//org.apache.lucene.index.ReaderPool.get(ReaderPool.java:397)
   >         at app//org.apache.lucene.index.IndexWriter.writeReaderPool(IndexWriter.java:4000)
   >         at app//org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:607)
   >         at app//org.apache.lucene.index.IndexWriter$4.getReader(IndexWriter.java:6588)
   >         at app//org.apache.lucene.tests.index.RandomIndexWriter.getReader(RandomIndexWriter.java:502)
   >         at app//org.apache.lucene.tests.index.RandomIndexWriter.getReader(RandomIndexWriter.java:428)
   >         at app//org.apache.lucene.index.TestIndexFileDeleter.testExcInDecRef(TestIndexFileDeleter.java:481)

I (as well as claude...) think it is possible that the injected runtime exception may happen inside the concurrent merge scheduler's merge thread, causing the IW and the reader pool to be shut down. Then the test thread gets AlreadyClosedException on w.getReader().

I think allowing AlreadyClosedException is fine here.

@dweiss dweiss added this to the 11.0.0 milestone Jan 2, 2026
@dweiss dweiss self-assigned this Jan 2, 2026
@dweiss dweiss added the skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check. label Jan 2, 2026
@dweiss dweiss merged commit f996e74 into apache:main Jan 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:core/index skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant