未验证 提交 0f3acfa8 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17580 from taosdata/feature/sync2-merge

fix(sync): fix timer bug
......@@ -2783,7 +2783,7 @@ static void syncNodeEqElectTimer(void* param, void* tmrId) {
syncTimeoutDestroy(pSyncMsg);
// reset timer ms
if (syncEnvIsStart()) {
if (syncEnvIsStart() && pSyncNode->electBaseLine > 0) {
pSyncNode->electTimerMS = syncUtilElectRandomMS(pSyncNode->electBaseLine, 2 * pSyncNode->electBaseLine);
taosTmrReset(syncNodeEqElectTimer, pSyncNode->electTimerMS, pSyncNode, gSyncEnv->pTimerManager,
&pSyncNode->pElectTimer);
......@@ -2846,7 +2846,7 @@ static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) {
return;
}
syncNodeEventLog(pSyncNode, "eq peer hb timer");
//syncNodeEventLog(pSyncNode, "eq peer hb timer");
int64_t timerLogicClock = atomic_load_64(&pSyncTimer->logicClock);
int64_t msgLogicClock = atomic_load_64(&pData->logicClock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册