diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 3089e9b39b12a740943e64c56a1bf9ac6d738b54..4a05176b7844cd8c8d042fb49ed8f899fc67ca21 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -2157,7 +2157,13 @@ void syncNodeUpdateTermWithoutStepDown(SSyncNode* pSyncNode, SyncTerm term) { } void syncNodeStepDown(SSyncNode* pSyncNode, SyncTerm newTerm) { - ASSERT(pSyncNode->pRaftStore->currentTerm <= newTerm); + if (pSyncNode->pRaftStore->currentTerm > newTerm) { + char logBuf[128]; + snprintf(logBuf, sizeof(logBuf), "step down, ignore, new-term:%" PRIu64 ", current-term:%" PRIu64, newTerm, + pSyncNode->pRaftStore->currentTerm); + syncNodeEventLog(pSyncNode, logBuf); + return; + } do { char logBuf[128];