refactor(sync): modify info log

This commit is contained in:
Minghao Li 2022-11-30 11:20:03 +08:00
parent 8ec0b42456
commit a8832e8814
3 changed files with 9 additions and 1 deletions

View File

@ -197,6 +197,7 @@ typedef struct SSyncNode {
int32_t configChangeNum;
int32_t hbSlowNum;
int32_t hbrSlowNum;
int32_t tmrRoutineNum;
bool isStart;

View File

@ -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);

View File

@ -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);