Log archiving fail cause regionserver abort

This commit is contained in:
SiCheng-Zheng 2022-06-23 18:15:59 +08:00
parent 342183e596
commit cc22be004f

View File

@ -816,6 +816,11 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
i.preLogArchive(p, newPath);
}
}
if (!fs.exists(this.walArchiveDir)) {
if (!fs.mkdirs(this.walArchiveDir)) {
throw new IOException("Unable to mkdir " + this.walArchiveDir);
}
}
LOG.info("Archiving " + p + " to " + newPath);
if (!CommonFSUtils.renameAndSetModifyTime(this.fs, p, newPath)) {
throw new IOException("Unable to rename " + p + " to " + newPath);