-
Notifications
You must be signed in to change notification settings - Fork 1k
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
TestIndexWriterOnDiskFull.testAddDocumentOnDiskFull failure #11755
Comments
The issue is caused by an exception-handling inconsistency in IndexWriter: if a fatal error (tragedy) happens to IndexWriter, you may receive exception in one of two ways:
Test has code like this (summarizing): try {
for (int i = 0; i < 200; i++) {
addDoc(writer);
}
// CMS hits disk full below, while we are in `startCommit()`. It is a bit racy and doesn't always reproduce due to threads.
// IllegalStateException, not IOException is thrown: "this writer hit an unrecoverable error; cannot commit"
// Test logic does not expect this exc class, so the test fails.
writer.commit();
} catch (IOException e) {
// test logic
} I'm not sure what to do yet. Obviously if we also catch |
The failure doesn't reproduce/debug very easily because CMS needs to hit disk full after |
Maybe i'm being overly picky, if you look at the rest of the tests. This test is named testAddIndexOnDiskFull() has We can fix the test to stop failing to reflect reality at least as a small step. |
…egalStateException from startCommit() If ConcurrentMergeScheduler is used, and the merge hits fatal exception (such as disk full) after prepareCommit()'s ensureOpen() check, then startCommit() will throw IllegalStateException instead of AlreadyClosedException. The test is currently not prepared to handle this: the logic is only geared around exceptions coming from addDocument() Closes apache#11755
I made a PR just fixing this test to handle this around the |
…egalStateException from startCommit() (#11757) If ConcurrentMergeScheduler is used, and the merge hits fatal exception (such as disk full) after prepareCommit()'s ensureOpen() check, then startCommit() will throw IllegalStateException instead of AlreadyClosedException. The test is currently not prepared to handle this: the logic is only geared around exceptions coming from addDocument() Closes #11755
…egalStateException from startCommit() (#11757) If ConcurrentMergeScheduler is used, and the merge hits fatal exception (such as disk full) after prepareCommit()'s ensureOpen() check, then startCommit() will throw IllegalStateException instead of AlreadyClosedException. The test is currently not prepared to handle this: the logic is only geared around exceptions coming from addDocument() Closes #11755
Description
From jenkins:
Gradle command to reproduce
NOTE: this seed reproduces on branch_9x (commit 2895887) only about half of the time.. there may be a race involved. if it does not fail, try it again.
/gradlew :lucene:core:test --tests "org.apache.lucene.index.TestIndexWriterOnDiskFull.testAddDocumentOnDiskFull" -Ptests.jvms=5 -Ptests.haltonfailure=false "-Ptests.jvmargs=-XX:-UseCompressedOops -XX:+UseSerialGC" -Ptests.seed=8E19B38FADF450D3 -Ptests.badapples=false -Ptests.gui=true -Ptests.file.encoding=UTF-8
The text was updated successfully, but these errors were encountered: