fix(sync): fix timer bug
This commit is contained in:
parent
577f5655bf
commit
e2a157bb02
|
@ -2783,7 +2783,7 @@ static void syncNodeEqElectTimer(void* param, void* tmrId) {
|
||||||
syncTimeoutDestroy(pSyncMsg);
|
syncTimeoutDestroy(pSyncMsg);
|
||||||
|
|
||||||
// reset timer ms
|
// reset timer ms
|
||||||
if (syncEnvIsStart()) {
|
if (syncEnvIsStart() && pSyncNode->electBaseLine > 0) {
|
||||||
pSyncNode->electTimerMS = syncUtilElectRandomMS(pSyncNode->electBaseLine, 2 * pSyncNode->electBaseLine);
|
pSyncNode->electTimerMS = syncUtilElectRandomMS(pSyncNode->electBaseLine, 2 * pSyncNode->electBaseLine);
|
||||||
taosTmrReset(syncNodeEqElectTimer, pSyncNode->electTimerMS, pSyncNode, gSyncEnv->pTimerManager,
|
taosTmrReset(syncNodeEqElectTimer, pSyncNode->electTimerMS, pSyncNode, gSyncEnv->pTimerManager,
|
||||||
&pSyncNode->pElectTimer);
|
&pSyncNode->pElectTimer);
|
||||||
|
@ -2846,7 +2846,7 @@ static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
syncNodeEventLog(pSyncNode, "eq peer hb timer");
|
//syncNodeEventLog(pSyncNode, "eq peer hb timer");
|
||||||
|
|
||||||
int64_t timerLogicClock = atomic_load_64(&pSyncTimer->logicClock);
|
int64_t timerLogicClock = atomic_load_64(&pSyncTimer->logicClock);
|
||||||
int64_t msgLogicClock = atomic_load_64(&pData->logicClock);
|
int64_t msgLogicClock = atomic_load_64(&pData->logicClock);
|
||||||
|
|
Loading…
Reference in New Issue