fix:skip begin&end snapshot while wal level = 0.

This commit is contained in:
xiao-77 2024-11-18 11:20:32 +08:00
parent 9364d314eb
commit c954d0ac7a
1 changed files with 8 additions and 0 deletions

View File

@ -376,6 +376,10 @@ static FORCE_INLINE int32_t walCheckAndRoll(SWal *pWal) {
int32_t walBeginSnapshot(SWal *pWal, int64_t ver, int64_t logRetention) {
int32_t code = 0;
if (pWal->cfg.level == TAOS_WAL_SKIP) {
TAOS_RETURN(TSDB_CODE_SUCCESS);
}
if (logRetention < 0) {
TAOS_RETURN(TSDB_CODE_FAILED);
}
@ -404,6 +408,10 @@ _exit:
int32_t walEndSnapshot(SWal *pWal) {
int32_t code = 0, lino = 0;
if (pWal->cfg.level == TAOS_WAL_SKIP) {
TAOS_RETURN(TSDB_CODE_SUCCESS);
}
TAOS_UNUSED(taosThreadRwlockWrlock(&pWal->mutex));
int64_t ver = pWal->vers.verInSnapshotting;