diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 5404591c7f944ad4e83b628ad4fcb2d31d4b8f79..80a3fb478eb4f678e527300bb2085248c5f8e7be 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -1074,6 +1074,8 @@ void syncNodeUpdateConfig(SSyncNode* pSyncNode, SSyncCfg* newConfig, bool* isDro voteGrantedUpdate(pSyncNode->pVotesGranted, pSyncNode); votesRespondUpdate(pSyncNode->pVotesRespond, pSyncNode); + pSyncNode->quorum = syncUtilQuorum(pSyncNode->pRaftCfg->cfg.replicaNum); + // isDrop *isDrop = true; bool IamInOld, IamInNew; @@ -1696,7 +1698,8 @@ const char* syncStr(ESyncState state) { int32_t syncNodeCommit(SSyncNode* ths, SyncIndex beginIndex, SyncIndex endIndex, uint64_t flag) { int32_t code = 0; ESyncState state = flag; - sInfo("sync event commit from %ld to %ld, %s", beginIndex, endIndex, syncUtilState2String(state)); + sInfo("sync event commit from index:%" PRId64 " to index:%" PRId64 ", %s", beginIndex, endIndex, + syncUtilState2String(state)); // maybe execute by leader, skip snapshot SSnapshot snapshot = {.data = NULL, .lastApplyIndex = -1, .lastApplyTerm = 0}; diff --git a/source/libs/sync/src/syncRaftLog.c b/source/libs/sync/src/syncRaftLog.c index 279b99428c0f7c1ba277ef3d9505dd54dc6f0d6a..ff70202f875235c7a0360b4a0214d04be296ce63 100644 --- a/source/libs/sync/src/syncRaftLog.c +++ b/source/libs/sync/src/syncRaftLog.c @@ -157,7 +157,7 @@ static int32_t raftLogAppendEntry(struct SSyncLogStore* pLogStore, SSyncRaftEntr walFsync(pWal, true); - sTrace("sync event write wal: %ld", pEntry->index); + sTrace("sync event write index:%" PRId64, pEntry->index); return code; }