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

Merge pull request #18695 from taosdata/feature/3.0_sync_pipeline

refactor(sync): modify/use default config value
......@@ -26,8 +26,6 @@ extern "C" {
#define ENV_TICK_TIMER_MS 1000
#define PING_TIMER_MS 5000
#define ELECT_TIMER_MS_MIN 2500
#define ELECT_TIMER_MS_MAX (ELECT_TIMER_MS_MIN * 2)
#define ELECT_TIMER_MS_RANGE (ELECT_TIMER_MS_MAX - ELECT_TIMER_MS_MIN)
#define HEARTBEAT_TIMER_MS 1000
#define HEARTBEAT_TICK_NUM 20
......
......@@ -1025,8 +1025,8 @@ SSyncNode* syncNodeOpen(SSyncInfo* pSyncInfo) {
}
// timer ms init
pSyncNode->pingBaseLine = PING_TIMER_MS;
pSyncNode->electBaseLine = ELECT_TIMER_MS_MIN;
pSyncNode->hbBaseLine = HEARTBEAT_TIMER_MS;
pSyncNode->electBaseLine = tsElectInterval;
pSyncNode->hbBaseLine = tsHeartbeatInterval;
// init ping timer
pSyncNode->pPingTimer = NULL;
......@@ -2384,7 +2384,7 @@ bool syncNodeHeartbeatReplyTimeout(SSyncNode* pSyncNode) {
continue;
}
if (tsNow - recvTime > SYNC_HEART_TIMEOUT_MS) {
if (tsNow - recvTime > tsHeartbeatTimeout) {
toCount++;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册