open the wal file even no any wal files when keep is set to 1

This commit is contained in:
Jeff Tao 2020-04-18 12:06:09 +08:00
parent 9e0f3af634
commit a8343afdb8
1 changed files with 4 additions and 1 deletions

View File

@ -208,7 +208,10 @@ int walRestore(void *handle, void *pVnode, int (*writeFp)(void *, void *, int))
}
}
if (count == 0) return 0;
if (count == 0) {
if (pWal->keep) code = walRenew(pWal);
return code;
}
if ( count != (maxId-minId+1) ) {
wError("wal:%s, messed up, count:%d max:%d min:%d", opath, count, maxId, minId);