-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Distributed Indexing/StoreIssues around managing unopened Lucene indices. If it touches Store.java, this is a likely label.Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label.>enhancement
Description
I was looking at how we detect corruptions, and the current logic tries to see whether the exception itself or any of its causes is an instance of CorruptIndexException. However, the following pattern that Lucene uses in multiple places:
Throwable priorE = null;
try (ChecksumIndexInput input = dir.openChecksumInput(fileName, context)) {
// do some stuff that may throw any exceptions
} catch (Throwable exception) {
priorE = exception;
} finally {
CodecUtil.checkFooter(input, priorE);
}causes the CorruptIndexException to be suppressed if some other exception was thrown in the try block. So the thrown exception would not be seen as a corruption exception. This makes me want to check for suppressed exceptions as well in ExceptionsHelper.unwrapCorruption but I don't know enough about corruption detection to know whether that is safe to do?
Metadata
Metadata
Assignees
Labels
:Distributed Indexing/StoreIssues around managing unopened Lucene indices. If it touches Store.java, this is a likely label.Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label.>enhancement