Merge pull request #1645 from taosdata/enhance/sdbWal

open the wal file even no any wal files when keep is set to 1
This commit is contained in:
slguan 2020-04-18 12:08:18 +08:00 committed by GitHub
commit cde4ab7c65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);