fix:skip begin&end snapshot while wal level = 0.
This commit is contained in:
parent
9364d314eb
commit
c954d0ac7a
|
@ -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 walBeginSnapshot(SWal *pWal, int64_t ver, int64_t logRetention) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
|
||||||
|
if (pWal->cfg.level == TAOS_WAL_SKIP) {
|
||||||
|
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
if (logRetention < 0) {
|
if (logRetention < 0) {
|
||||||
TAOS_RETURN(TSDB_CODE_FAILED);
|
TAOS_RETURN(TSDB_CODE_FAILED);
|
||||||
}
|
}
|
||||||
|
@ -404,6 +408,10 @@ _exit:
|
||||||
int32_t walEndSnapshot(SWal *pWal) {
|
int32_t walEndSnapshot(SWal *pWal) {
|
||||||
int32_t code = 0, lino = 0;
|
int32_t code = 0, lino = 0;
|
||||||
|
|
||||||
|
if (pWal->cfg.level == TAOS_WAL_SKIP) {
|
||||||
|
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
TAOS_UNUSED(taosThreadRwlockWrlock(&pWal->mutex));
|
TAOS_UNUSED(taosThreadRwlockWrlock(&pWal->mutex));
|
||||||
int64_t ver = pWal->vers.verInSnapshotting;
|
int64_t ver = pWal->vers.verInSnapshotting;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue