fix: adjust sync logs
This commit is contained in:
parent
34260cd397
commit
bf6dc99461
|
@ -785,9 +785,9 @@ static void mndReloadSyncConfig(SMnode *pMnode) {
|
||||||
|
|
||||||
int32_t code = syncReconfig(pMnode->syncMgmt.sync, &cfg);
|
int32_t code = syncReconfig(pMnode->syncMgmt.sync, &cfg);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("vgId:1, failed to reconfig mnode sync since %s", terrstr());
|
mError("vgId:1, mnode sync reconfig failed since %s", terrstr());
|
||||||
} else {
|
} else {
|
||||||
mInfo("vgId:1, reconfig mnode sync success");
|
mInfo("vgId:1, mnode sync reconfig success");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,7 @@ static int32_t sdbReadFileImp(SSdb *pSdb) {
|
||||||
if (pFile == NULL) {
|
if (pFile == NULL) {
|
||||||
taosMemoryFree(pRaw);
|
taosMemoryFree(pRaw);
|
||||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||||
mDebug("failed to read sdb file:%s since %s", file, terrstr());
|
mInfo("read sdb file:%s finished since %s", file, terrstr());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ void syncHbTimerDataRemove(int64_t rid) { taosRemoveRef(gHbDataRefId, rid); }
|
||||||
|
|
||||||
SSyncHbTimerData *syncHbTimerDataAcquire(int64_t rid) {
|
SSyncHbTimerData *syncHbTimerDataAcquire(int64_t rid) {
|
||||||
SSyncHbTimerData *pData = taosAcquireRef(gHbDataRefId, rid);
|
SSyncHbTimerData *pData = taosAcquireRef(gHbDataRefId, rid);
|
||||||
if (pData == NULL) {
|
if (pData == NULL && rid > 0) {
|
||||||
sInfo("failed to acquire hb-timer-data from refId:%" PRId64, rid);
|
sInfo("failed to acquire hb-timer-data from refId:%" PRId64, rid);
|
||||||
terrno = TSDB_CODE_SYN_INTERNAL_ERROR;
|
terrno = TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1456,16 +1456,21 @@ int32_t syncNodeSendMsgById(const SRaftId* destRaftId, SSyncNode* pNode, SRpcMsg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t code = -1;
|
||||||
if (pNode->syncSendMSg != NULL && epSet != NULL) {
|
if (pNode->syncSendMSg != NULL && epSet != NULL) {
|
||||||
syncUtilMsgHtoN(pMsg->pCont);
|
syncUtilMsgHtoN(pMsg->pCont);
|
||||||
pMsg->info.noResp = 1;
|
pMsg->info.noResp = 1;
|
||||||
return pNode->syncSendMSg(epSet, pMsg);
|
code = pNode->syncSendMSg(epSet, pMsg);
|
||||||
} else {
|
}
|
||||||
sError("vgId:%d, sync send msg by id error, fp:%p epset:%p", pNode->vgId, pNode->syncSendMSg, epSet);
|
|
||||||
|
if (code < 0) {
|
||||||
|
sError("vgId:%d, sync send msg by id error, epset:%p dnode:%d addr:%" PRId64 " err:0x%x", pNode->vgId, epSet,
|
||||||
|
DID(destRaftId), destRaftId->addr, terrno);
|
||||||
rpcFreeCont(pMsg->pCont);
|
rpcFreeCont(pMsg->pCont);
|
||||||
terrno = TSDB_CODE_SYN_INTERNAL_ERROR;
|
terrno = TSDB_CODE_SYN_INTERNAL_ERROR;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool syncNodeInConfig(SSyncNode* pNode, const SSyncCfg* pCfg) {
|
inline bool syncNodeInConfig(SSyncNode* pNode, const SSyncCfg* pCfg) {
|
||||||
|
|
Loading…
Reference in New Issue