[fix](restore) fix restore issue when meta version is too low (#8816)

When restore snapshot from 0.13 to master, the restore job is pending for long time.
However, we get error "Could not set meta version to 93 since it is lower than minimum required version 100" in log.
We should cancel restore job once get that error.
This commit is contained in:
GoGoWen
2022-04-03 10:56:23 +08:00
committed by GitHub
parent 78b85414d6
commit a8417e6c8b

View File

@ -423,6 +423,9 @@ public class Repository implements Writable {
LOG.warn("failed to read backup meta from file", e);
return new Status(ErrCode.COMMON_ERROR, "Failed create backup meta from file: "
+ localMetaFile.getAbsolutePath() + ", msg: " + e.getMessage());
} catch (IllegalArgumentException e) {
LOG.warn("failed to set meta version", e);
return new Status(ErrCode.COMMON_ERROR, e.getMessage());
} finally {
localMetaFile.delete();
}