Handle IOException while checking translog corruption

We can hit an IOException while reading a translog header after corrupting it.

Relates #58866
This commit is contained in:
Nhat Nguyen 2020-07-02 22:37:49 -04:00
parent b769e9143d
commit 65645217bc
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ public class TestTranslog {
try {
final int version = TranslogHeader.readHeaderVersion(corruptedFile, channel, in);
return version == TranslogHeader.VERSION_CHECKPOINTS;
} catch (IllegalStateException | TranslogCorruptedException e) {
} catch (IllegalStateException | TranslogCorruptedException | IOException e) {
return false;
}
}