From f8520491565d18ba5b7e6be66daf6015b5290449 Mon Sep 17 00:00:00 2001 From: dmchen Date: Tue, 3 Dec 2024 11:37:10 +0800 Subject: [PATCH] fix/remove-wrong-error-log --- source/libs/sync/src/syncMain.c | 3 +-- source/libs/sync/src/syncPipeline.c | 4 ++-- source/libs/sync/src/syncReplication.c | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 5bdac16f42..9748bb1ec4 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -1697,9 +1697,8 @@ void syncNodeResetElectTimer(SSyncNode* pSyncNode) { electMS = syncUtilElectRandomMS(pSyncNode->electBaseLine, 2 * pSyncNode->electBaseLine); } - // TODO check return value if ((code = syncNodeRestartElectTimer(pSyncNode, electMS)) != 0) { - sError("vgId:%d, failed to restart elect timer since %s", pSyncNode->vgId, tstrerror(code)); + sWarn("vgId:%d, failed to restart elect timer since %s", pSyncNode->vgId, tstrerror(code)); return; }; diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index efb71b5714..af6aab5d2b 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -1152,11 +1152,11 @@ int32_t syncLogReplProcessReply(SSyncLogReplMgr* pMgr, SSyncNode* pNode, SyncApp int32_t code = 0; if (pMgr->restored) { if ((code = syncLogReplContinue(pMgr, pNode, pMsg)) != 0) { - sError("vgId:%d, failed to continue sync log repl since %s", pNode->vgId, tstrerror(code)); + sWarn("vgId:%d, failed to continue sync log repl since %s", pNode->vgId, tstrerror(code)); } } else { if ((code = syncLogReplRecover(pMgr, pNode, pMsg)) != 0) { - sError("vgId:%d, failed to recover sync log repl since %s", pNode->vgId, tstrerror(code)); + sWarn("vgId:%d, failed to recover sync log repl since %s", pNode->vgId, tstrerror(code)); } } (void)taosThreadMutexUnlock(&pBuf->mutex); diff --git a/source/libs/sync/src/syncReplication.c b/source/libs/sync/src/syncReplication.c index 7466aaf66e..7b5b40f327 100644 --- a/source/libs/sync/src/syncReplication.c +++ b/source/libs/sync/src/syncReplication.c @@ -75,8 +75,10 @@ int32_t syncNodeReplicateWithoutLock(SSyncNode* pNode) { continue; } SSyncLogReplMgr* pMgr = pNode->logReplMgrs[i]; - if (syncLogReplStart(pMgr, pNode) != 0) { - sError("vgId:%d, failed to start log replication to dnode:%d", pNode->vgId, DID(&(pNode->replicasId[i]))); + int32_t ret = 0; + if ((ret = syncLogReplStart(pMgr, pNode)) != 0) { + sWarn("vgId:%d, failed to start log replication to dnode:%d since %s", pNode->vgId, DID(&(pNode->replicasId[i])), + tstrerror(ret)); } }