提交 3734a0ff 编写于 作者: B Benguang Zhao

enh: keep retrying on syncFsmExecute failure

上级 21196a97
......@@ -626,12 +626,15 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm
pEntry->term, TMSG_INFO(pEntry->originalRpcType));
}
if (syncFsmExecute(pNode, pFsm, role, currentTerm, pEntry, 0, false) != 0) {
sError("vgId:%d, failed to execute sync log entry. index:%" PRId64 ", term:%" PRId64
", role:%d, current term:%" PRId64,
vgId, pEntry->index, pEntry->term, role, currentTerm);
goto _out;
}
do {
if ((ret = syncFsmExecute(pNode, pFsm, role, currentTerm, pEntry, 0, false)) != 0) {
sError("vgId:%d, failed to execute sync log entry since %s. index:%" PRId64 ", term:%" PRId64
", role:%d, current term:%" PRId64,
vgId, terrstr(), pEntry->index, pEntry->term, role, currentTerm);
taosMsleep(10);
}
} while (ret != 0 && terrno != TSDB_CODE_VND_INVALID_VGROUP_ID);
pBuf->commitIndex = index;
sTrace("vgId:%d, committed index:%" PRId64 ", term:%" PRId64 ", role:%d, current term:%" PRId64 "", pNode->vgId,
......
......@@ -339,8 +339,9 @@ bool walLogEntriesComplete(const SWal* pWal) {
}
if (!complete) {
wError("vgId:%d, WAL log entries incomplete in range [%" PRId64 ", %" PRId64 "], aligned with snaphotVer:%" PRId64,
pWal->cfg.vgId, pWal->vers.firstVer, pWal->vers.lastVer, pWal->vers.snapshotVer);
wError("vgId:%d, WAL log entries incomplete in range [%" PRId64 ", %" PRId64 "], missing index:%" PRId64
", snaphotVer:%" PRId64,
pWal->cfg.vgId, pWal->vers.firstVer, pWal->vers.lastVer, index, pWal->vers.snapshotVer);
terrno = TSDB_CODE_WAL_LOG_INCOMPLETE;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册