enh: adjust logging levels in syncLogBufferAccept, e.g. sInfo to sWarn
This commit is contained in:
parent
082428acab
commit
012bcf1a5d
|
@ -286,7 +286,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index - pBuf->startIndex >= pBuf->size) {
|
if (index - pBuf->startIndex >= pBuf->size) {
|
||||||
sInfo("vgId:%d, out of buffer range. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64
|
sWarn("vgId:%d, out of buffer range. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64
|
||||||
" %" PRId64 ", %" PRId64 ")",
|
" %" PRId64 ", %" PRId64 ")",
|
||||||
pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex,
|
pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex,
|
||||||
pBuf->endIndex);
|
pBuf->endIndex);
|
||||||
|
@ -294,7 +294,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index > pBuf->matchIndex && lastMatchTerm != prevTerm) {
|
if (index > pBuf->matchIndex && lastMatchTerm != prevTerm) {
|
||||||
sInfo("vgId:%d, not ready to accept. index: %" PRId64 ", term: %" PRId64 ": prevterm: %" PRId64
|
sWarn("vgId:%d, not ready to accept. index: %" PRId64 ", term: %" PRId64 ": prevterm: %" PRId64
|
||||||
" != lastmatch: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")",
|
" != lastmatch: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")",
|
||||||
pNode->vgId, pEntry->index, pEntry->term, prevTerm, lastMatchTerm, pBuf->startIndex, pBuf->commitIndex,
|
pNode->vgId, pEntry->index, pEntry->term, prevTerm, lastMatchTerm, pBuf->startIndex, pBuf->commitIndex,
|
||||||
pBuf->matchIndex, pBuf->endIndex);
|
pBuf->matchIndex, pBuf->endIndex);
|
||||||
|
@ -309,7 +309,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt
|
||||||
if (pEntry->term != pExist->term) {
|
if (pEntry->term != pExist->term) {
|
||||||
(void)syncLogBufferRollback(pBuf, index);
|
(void)syncLogBufferRollback(pBuf, index);
|
||||||
} else {
|
} else {
|
||||||
sDebug("vgId:%d, duplicate log entry received. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64
|
sTrace("vgId:%d, duplicate log entry received. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64
|
||||||
" %" PRId64 " %" PRId64 ", %" PRId64 ")",
|
" %" PRId64 " %" PRId64 ", %" PRId64 ")",
|
||||||
pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex,
|
pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex,
|
||||||
pBuf->endIndex);
|
pBuf->endIndex);
|
||||||
|
@ -622,7 +622,7 @@ int32_t syncLogReplMgrRetryOnNeed(SSyncLogReplMgr* pMgr, SSyncNode* pNode) {
|
||||||
_out:
|
_out:
|
||||||
if (retried) {
|
if (retried) {
|
||||||
pMgr->retryBackoff = syncLogGetNextRetryBackoff(pMgr);
|
pMgr->retryBackoff = syncLogGetNextRetryBackoff(pMgr);
|
||||||
sInfo("vgId:%d, resend %d sync log entries. dest: %" PRIx64 ", indexes: %" PRId64 " ..., likely term: %" PRId64
|
sInfo("vgId:%d, resend %d sync log entries. dest: %" PRIx64 ", indexes: %" PRId64 " ..., terms: ... %" PRId64
|
||||||
", retryWaitMs: %" PRId64 ", repl mgr: [%" PRId64 " %" PRId64 ", %" PRId64 ")",
|
", retryWaitMs: %" PRId64 ", repl mgr: [%" PRId64 " %" PRId64 ", %" PRId64 ")",
|
||||||
pNode->vgId, count, pDestId->addr, firstIndex, term, retryWaitMs, pMgr->startIndex, pMgr->matchIndex,
|
pNode->vgId, count, pDestId->addr, firstIndex, term, retryWaitMs, pMgr->startIndex, pMgr->matchIndex,
|
||||||
pMgr->endIndex);
|
pMgr->endIndex);
|
||||||
|
|
Loading…
Reference in New Issue