Merge pull request #18563 from taosdata/feature/3.0_mhli

refactor(sync): modify info log
This commit is contained in:
Shengliang Guan 2022-11-30 14:08:51 +08:00 committed by GitHub
commit 822aecea9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
ths->tmrRoutineNum++;
if (ths->tmrRoutineNum % 60 == 0 && ths->replicaNum > 1) {
sNInfo(ths, "timer routines");
} else {
sNTrace(ths, "timer routines");
}
// timer replicate
syncNodeReplicate(ths);