Merge pull request #22203 from taosdata/FIX/TD-25382-3.0

fix: not to walEndSnapshot in syncNodeTimerRoutine
This commit is contained in:
wade zhang 2023-07-27 10:15:55 +08:00 committed by GitHub
commit 866f469bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 16 deletions

View File

@ -87,22 +87,6 @@ static int32_t syncNodeTimerRoutine(SSyncNode* ths) {
}
}
if (atomic_load_64(&ths->snapshottingIndex) != SYNC_INDEX_INVALID) {
// end timeout wal snapshot
if (timeNow - ths->snapshottingTime > SYNC_DEL_WAL_MS &&
atomic_load_64(&ths->snapshottingIndex) != SYNC_INDEX_INVALID) {
SSyncLogStoreData* pData = ths->pLogStore->data;
int32_t code = walEndSnapshot(pData->pWal);
if (code != 0) {
sNError(ths, "timer wal snapshot end error since:%s", terrstr());
return -1;
} else {
sNTrace(ths, "wal snapshot end, index:%" PRId64, atomic_load_64(&ths->snapshottingIndex));
atomic_store_64(&ths->snapshottingIndex, SYNC_INDEX_INVALID);
}
}
}
if (!syncNodeIsMnode(ths)) {
syncRespClean(ths->pSyncRespMgr);
}