未验证 提交 704c8e90 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #19436 from taosdata/FIX/TD-21812-main

fix: use pInfo->info.state.committed for WAL snapshot instead of the current one for async vnodeCommit
...@@ -329,8 +329,7 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) { ...@@ -329,8 +329,7 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) {
snprintf(dir, TSDB_FILENAME_LEN, "%s", pVnode->path); snprintf(dir, TSDB_FILENAME_LEN, "%s", pVnode->path);
} }
// walBeginSnapshot(pVnode->pWal, pVnode->state.applied); syncBeginSnapshot(pVnode->sync, pInfo->info.state.committed);
syncBeginSnapshot(pVnode->sync, pVnode->state.applied);
// commit each sub-system // commit each sub-system
code = tsdbCommit(pVnode->pTsdb, pInfo); code = tsdbCommit(pVnode->pTsdb, pInfo);
...@@ -372,7 +371,6 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) { ...@@ -372,7 +371,6 @@ static int vnodeCommitImpl(SCommitInfo *pInfo) {
return -1; return -1;
} }
// walEndSnapshot(pVnode->pWal);
syncEndSnapshot(pVnode->sync); syncEndSnapshot(pVnode->sync);
_exit: _exit:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册