fix: send response on enqueue msg failed

This commit is contained in:
Shengliang Guan 2022-11-08 22:59:05 +08:00
parent 4112f1c1f0
commit 1c8a2d696d
1 changed files with 4 additions and 1 deletions

View File

@ -719,8 +719,11 @@ int32_t syncNodePropose(SSyncNode* pSyncNode, SRpcMsg* pMsg, bool isWeak) {
sNTrace(pSyncNode, "propose message, type:%s", TMSG_INFO(pMsg->msgType));
ret = (*pSyncNode->syncEqMsg)(pSyncNode->msgcb, &rpcMsg);
if (ret != 0) {
terrno = TSDB_CODE_SYN_INTERNAL_ERROR;
if (terrno != 0) ret = terrno;
sError("vgId:%d, failed to enqueue msg since %s", pSyncNode->vgId, terrstr());
syncRespMgrDel(pSyncNode->pSyncRespMgr, seqNum);
SRpcMsg rsp = {.code = ret, .info = pMsg->info};
tmsgSendRsp(&rsp);
}
}