enh: adjust error msg as warn for not ready to propose etc
This commit is contained in:
parent
d83f85bf26
commit
baa7f9c895
|
@ -220,8 +220,8 @@ void vnodeProposeWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs)
|
|||
isWeak, isBlock, msg, numOfMsgs, arrayPos, pMsg->info.handle);
|
||||
|
||||
if (!pVnode->restored) {
|
||||
vGError("vgId:%d, msg:%p failed to process since restore not finished, type:%s", vgId, pMsg,
|
||||
TMSG_INFO(pMsg->msgType));
|
||||
vGWarn("vgId:%d, msg:%p failed to process since restore not finished, type:%s", vgId, pMsg,
|
||||
TMSG_INFO(pMsg->msgType));
|
||||
terrno = TSDB_CODE_SYN_RESTORING;
|
||||
vnodeHandleProposeError(pVnode, pMsg, TSDB_CODE_SYN_RESTORING);
|
||||
rpcFreeCont(pMsg->pCont);
|
||||
|
@ -284,8 +284,8 @@ void vnodeProposeWriteMsg(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfMsgs)
|
|||
vnodeIsMsgBlock(pMsg->msgType), msg, numOfMsgs, pMsg->info.handle);
|
||||
|
||||
if (!pVnode->restored) {
|
||||
vGError("vgId:%d, msg:%p failed to process since restore not finished, type:%s", vgId, pMsg,
|
||||
TMSG_INFO(pMsg->msgType));
|
||||
vGWarn("vgId:%d, msg:%p failed to process since restore not finished, type:%s", vgId, pMsg,
|
||||
TMSG_INFO(pMsg->msgType));
|
||||
vnodeHandleProposeError(pVnode, pMsg, TSDB_CODE_SYN_RESTORING);
|
||||
rpcFreeCont(pMsg->pCont);
|
||||
taosFreeQitem(pMsg);
|
||||
|
|
|
@ -662,14 +662,14 @@ ESyncRole syncGetRole(int64_t rid) {
|
|||
int32_t syncNodePropose(SSyncNode* pSyncNode, SRpcMsg* pMsg, bool isWeak, int64_t* seq) {
|
||||
if (pSyncNode->state != TAOS_SYNC_STATE_LEADER) {
|
||||
terrno = TSDB_CODE_SYN_NOT_LEADER;
|
||||
sNError(pSyncNode, "sync propose not leader, type:%s", TMSG_INFO(pMsg->msgType));
|
||||
sNWarn(pSyncNode, "sync propose not leader, type:%s", TMSG_INFO(pMsg->msgType));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!pSyncNode->restoreFinish) {
|
||||
terrno = TSDB_CODE_SYN_PROPOSE_NOT_READY;
|
||||
sNError(pSyncNode, "failed to sync propose since not ready, type:%s, last:%" PRId64 ", cmt:%" PRId64,
|
||||
TMSG_INFO(pMsg->msgType), syncNodeGetLastIndex(pSyncNode), pSyncNode->commitIndex);
|
||||
sNWarn(pSyncNode, "failed to sync propose since not ready, type:%s, last:%" PRId64 ", cmt:%" PRId64,
|
||||
TMSG_INFO(pMsg->msgType), syncNodeGetLastIndex(pSyncNode), pSyncNode->commitIndex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ int32_t syncLogBufferInitWithoutLock(SSyncLogBuffer* pBuf, SSyncNode* pNode) {
|
|||
}
|
||||
|
||||
if (pLogStore->syncLogGetEntry(pLogStore, index, &pEntry) < 0) {
|
||||
sError("vgId:%d, failed to get log entry since %s. index:%" PRId64 "", pNode->vgId, terrstr(), index);
|
||||
sWarn("vgId:%d, failed to get log entry since %s. index:%" PRId64 "", pNode->vgId, terrstr(), index);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1237,7 +1237,7 @@ SSyncRaftEntry* syncLogBufferGetOneEntry(SSyncLogBuffer* pBuf, SSyncNode* pNode,
|
|||
} else {
|
||||
*pInBuf = false;
|
||||
if (pNode->pLogStore->syncLogGetEntry(pNode->pLogStore, index, &pEntry) < 0) {
|
||||
sError("vgId:%d, failed to get log entry since %s. index:%" PRId64 "", pNode->vgId, terrstr(), index);
|
||||
sWarn("vgId:%d, failed to get log entry since %s. index:%" PRId64 "", pNode->vgId, terrstr(), index);
|
||||
}
|
||||
}
|
||||
return pEntry;
|
||||
|
@ -1253,7 +1253,7 @@ int32_t syncLogReplSendTo(SSyncLogReplMgr* pMgr, SSyncNode* pNode, SyncIndex ind
|
|||
|
||||
pEntry = syncLogBufferGetOneEntry(pBuf, pNode, index, &inBuf);
|
||||
if (pEntry == NULL) {
|
||||
sError("vgId:%d, failed to get raft entry for index:%" PRId64 "", pNode->vgId, index);
|
||||
sWarn("vgId:%d, failed to get raft entry for index:%" PRId64 "", pNode->vgId, index);
|
||||
if (terrno == TSDB_CODE_WAL_LOG_NOT_EXIST) {
|
||||
SSyncLogReplMgr* pMgr = syncNodeGetLogReplMgr(pNode, pDestId);
|
||||
if (pMgr) {
|
||||
|
|
Loading…
Reference in New Issue