diff --git a/source/libs/sync/inc/syncInt.h b/source/libs/sync/inc/syncInt.h index d764901ab38f7762a18380a1db903e3bbd099e13..145880fa3e6929b931c4a5bc89ce7198425f046e 100644 --- a/source/libs/sync/inc/syncInt.h +++ b/source/libs/sync/inc/syncInt.h @@ -197,6 +197,7 @@ typedef struct SSyncNode { int32_t configChangeNum; int32_t hbSlowNum; int32_t hbrSlowNum; + int32_t tmrRoutineNum; bool isStart; diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 19a3bd06cfe665e98599565b81ac426487c32146..3117f6e4c90c72a493a6b43cb337f905937c436b 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -1037,6 +1037,7 @@ SSyncNode* syncNodeOpen(SSyncInfo* pSyncInfo) { pSyncNode->configChangeNum = 0; pSyncNode->hbSlowNum = 0; pSyncNode->hbrSlowNum = 0; + pSyncNode->tmrRoutineNum = 0; sNTrace(pSyncNode, "sync open, node:%p", pSyncNode); diff --git a/source/libs/sync/src/syncTimeout.c b/source/libs/sync/src/syncTimeout.c index ca67eb188040cd190366a37170d93c4f554378e7..0b58f1080f97877ec708e9bd687fcd515484ea34 100644 --- a/source/libs/sync/src/syncTimeout.c +++ b/source/libs/sync/src/syncTimeout.c @@ -52,7 +52,13 @@ static void syncNodeCleanConfigIndex(SSyncNode* ths) { } static int32_t syncNodeTimerRoutine(SSyncNode* ths) { - sNInfo(ths, "timer routines"); + ths->tmrRoutineNum++; + + if (ths->tmrRoutineNum % 60 == 0 && ths->replicaNum > 1) { + sNInfo(ths, "timer routines"); + } else { + sNTrace(ths, "timer routines"); + } // timer replicate syncNodeReplicate(ths);