diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index 532a6955cf204354b4e0574c2e85886e563c7dc8..0e1d107f045080f47dbe76051c8c77db8b7f241b 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -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, diff --git a/source/libs/wal/src/walMeta.c b/source/libs/wal/src/walMeta.c index e700ef3d0a21150b932f75e463d2168d8942d3b6..c6afcb19cc38f6c236f6db170990eba61db77ab9 100644 --- a/source/libs/wal/src/walMeta.c +++ b/source/libs/wal/src/walMeta.c @@ -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; }