未验证 提交 2103df29 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #18006 from taosdata/feature/3.0_mhli

refactor(sync): if index less than wal.commitVer, do not truncate, otherwise it will print much log
......@@ -294,6 +294,12 @@ static int32_t raftLogTruncate(struct SSyncLogStore* pLogStore, SyncIndex fromIn
return 0;
}
// need not truncate
SyncIndex walCommitVer = walGetCommittedVer(pWal);
if (fromIndex <= walCommitVer) {
return 0;
}
int32_t code = walRollback(pWal, fromIndex);
if (code != 0) {
int32_t err = terrno;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册