From 529d8cc800f53e50131a943e6b79f36bf52b6150 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 6 Dec 2022 16:42:37 +0800 Subject: [PATCH] enh: enable timeout checking of sync Resp with ttl as 30s --- include/libs/sync/sync.h | 2 +- source/libs/sync/src/syncTimeout.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/libs/sync/sync.h b/include/libs/sync/sync.h index 7f9b240f63..900bc88c41 100644 --- a/include/libs/sync/sync.h +++ b/include/libs/sync/sync.h @@ -25,7 +25,7 @@ extern "C" { #include "tlrucache.h" #include "tmsgcb.h" -#define SYNC_RESP_TTL_MS 10000000 +#define SYNC_RESP_TTL_MS 30000 #define SYNC_SPEED_UP_HB_TIMER 400 #define SYNC_SPEED_UP_AFTER_MS (1000 * 20) #define SYNC_SLOW_DOWN_RANGE 100 diff --git a/source/libs/sync/src/syncTimeout.c b/source/libs/sync/src/syncTimeout.c index cf933d98b2..9c39fc1e8e 100644 --- a/source/libs/sync/src/syncTimeout.c +++ b/source/libs/sync/src/syncTimeout.c @@ -19,6 +19,7 @@ #include "syncRaftCfg.h" #include "syncRaftLog.h" #include "syncReplication.h" +#include "syncRespMgr.h" #include "syncUtil.h" static void syncNodeCleanConfigIndex(SSyncNode* ths) { @@ -85,11 +86,9 @@ static int32_t syncNodeTimerRoutine(SSyncNode* ths) { } } -#if 0 if (!syncNodeIsMnode(ths)) { syncRespClean(ths->pSyncRespMgr); } -#endif return 0; } -- GitLab