Merge pull request #16985 from elastic/remove_leniency_in_commitpoint_checks

Remove leniency from segments info integrity checks

Closes #16973
This commit is contained in:
Simon Willnauer 2016-03-09 11:25:42 +01:00
commit 5fca3b6126
1 changed files with 1 additions and 5 deletions

View File

@ -235,11 +235,7 @@ public class Lucene {
@Override @Override
protected Object doBody(String segmentFileName) throws IOException { protected Object doBody(String segmentFileName) throws IOException {
try (IndexInput input = directory.openInput(segmentFileName, IOContext.READ)) { try (IndexInput input = directory.openInput(segmentFileName, IOContext.READ)) {
final int format = input.readInt(); CodecUtil.checksumEntireFile(input);
if (format == CodecUtil.CODEC_MAGIC) {
CodecUtil.checksumEntireFile(input);
}
// legacy....
} }
return null; return null;
} }