-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Corruption detection is fragile? #24800
Copy link
Copy link
Closed
Labels
:Distributed/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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Distributed/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
Type
Fields
Give feedbackNo fields configured for issues without a type.