enh(TD-36909: adjust sync timer routine log (#32098)
This commit is contained in:
parent
e669dc2be0
commit
1dd958c7f2
|
@ -779,6 +779,7 @@ int32_t taosGetErrSize();
|
|||
#define TSDB_CODE_SYN_WRONG_ROLE TAOS_DEF_ERROR_CODE(0, 0x091F)
|
||||
#define TSDB_CODE_SYN_NOT_IN_RAFT_GROUP TAOS_DEF_ERROR_CODE(0, 0x0920)
|
||||
#define TSDB_CODE_SYN_TERM_NOT_MATCH TAOS_DEF_ERROR_CODE(0, 0x0921)
|
||||
#define TSDB_CODE_FAIL_GET_LOCK TAOS_DEF_ERROR_CODE(0, 0x0922)
|
||||
#define TSDB_CODE_SYN_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x09FF)
|
||||
|
||||
|
||||
|
|
|
@ -60,7 +60,8 @@ int32_t syncNodeReplicate(SSyncNode* pNode) {
|
|||
SSyncLogBuffer* pBuf = pNode->pLogBuf;
|
||||
int32_t ret = 0;
|
||||
if ((ret = taosThreadMutexTryLock(&pBuf->mutex)) != 0) {
|
||||
return ret;
|
||||
sWarn("vgId:%d, failed to get log buffer mutex since %d", pNode->vgId, ret);
|
||||
return TSDB_CODE_FAIL_GET_LOCK;
|
||||
}
|
||||
ret = syncNodeReplicateWithoutLock(pNode);
|
||||
(void)taosThreadMutexUnlock(&pBuf->mutex);
|
||||
|
|
|
@ -67,7 +67,10 @@ static int32_t syncNodeTimerRoutine(SSyncNode* ths) {
|
|||
|
||||
// timer replicate
|
||||
sDebug("vgId:%d, timer routine, node replicate", ths->vgId);
|
||||
TAOS_CHECK_RETURN(syncNodeReplicate(ths));
|
||||
int32_t ret = 0;
|
||||
if((ret = syncNodeReplicate(ths)) != 0){
|
||||
sWarn("vgId:%d, failed to replicate node since %s", ths->vgId, tstrerror(ret));
|
||||
}
|
||||
|
||||
// clean mnode index
|
||||
sDebug("vgId:%d, timer routine, clean config index", ths->vgId);
|
||||
|
@ -93,7 +96,9 @@ static int32_t syncNodeTimerRoutine(SSyncNode* ths) {
|
|||
snapshotSenderStop(pSender, false);
|
||||
} else {
|
||||
sSWarn(pSender, "snap replication resend.");
|
||||
TAOS_CHECK_RETURN(snapshotReSend(pSender));
|
||||
if((ret = snapshotReSend(pSender)) != 0){
|
||||
sWarn("vgId:%d, failed to snapshot resend in timer routine since %s", ths->vgId, tstrerror(ret));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -630,6 +630,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_SYN_RETURN_VALUE_NULL, "Sync got a null retur
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_SYN_WRONG_ROLE, "Sync got a wrong role")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_SYN_NOT_IN_RAFT_GROUP, "Sync not in raft group")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_SYN_TERM_NOT_MATCH, "Sync term not match current term")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FAIL_GET_LOCK, "Sync failed to get lock, will retry next time")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_SYN_INTERNAL_ERROR, "Sync internal error")
|
||||
|
||||
//tq
|
||||
|
|
|
@ -39,7 +39,7 @@ ignoreCodes = [
|
|||
'0x80000813', '0x80000814', '0x80000815', '0x80000816', '0x80000817', '0x80000818', '0x80000819', '0x80000820', '0x80000821', '0x80000822',
|
||||
'0x80000823', '0x80000824', '0x80000825', '0x80000826', '0x80000827', '0x80000828', '0x80000829', '0x8000082A', '0x8000082B', '0x8000082C',
|
||||
'0x8000082D', '0x8000082E', '0x8000082F', '0x80000830', '0x80000831', '0x80000832', '0x80000833', '0x80000907', '0x80000919', '0x8000091A',
|
||||
'0x8000091B', '0x8000091C', '0x8000091D', '0x8000091E', '0x8000091F', '0x80000920', '0x80000921', '0x80000A00',
|
||||
'0x8000091B', '0x8000091C', '0x8000091D', '0x8000091E', '0x8000091F', '0x80000920', '0x80000921', '0x80000922', '0x80000A00',
|
||||
'0x80000A01', '0x80000A03', '0x80000A06', '0x80000A07', '0x80000A08', '0x80000A09', '0x80000A0A', '0x80000A0B', '0x80000A0E', '0x80002206',
|
||||
'0x80002207', '0x80002406', '0x80002407', '0x80002503', '0x80002506', '0x80002507', '0x8000261B', '0x80002653', '0x80002668', '0x80002669',
|
||||
'0x8000266A', '0x8000266B', '0x8000266C', '0x8000266D', '0x8000266E', '0x8000266F', '0x80002670', '0x80002671', '0x80002672', '0x80002673',
|
||||
|
|
|
@ -267,6 +267,7 @@ class TestTaosdMonitor:
|
|||
updatecfgDict["monitorMaxLogs"] = "10"
|
||||
updatecfgDict["monitorComp"] = "1"
|
||||
updatecfgDict["monitorForceV2"] = "0"
|
||||
updatecfgDict["monitorLogProtocol"] = '1'
|
||||
|
||||
updatecfgDict["audit"] = '0'
|
||||
|
||||
|
|
Loading…
Reference in New Issue