fix: duplicate response while set standby in vnode
This commit is contained in:
parent
421efe365b
commit
c0183e1fa8
|
@ -107,13 +107,7 @@ static void vmProcessSyncQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numOf
|
||||||
const STraceId *trace = &pMsg->info.traceId;
|
const STraceId *trace = &pMsg->info.traceId;
|
||||||
dGTrace("vgId:%d, msg:%p get from vnode-sync queue", pVnode->vgId, pMsg);
|
dGTrace("vgId:%d, msg:%p get from vnode-sync queue", pVnode->vgId, pMsg);
|
||||||
|
|
||||||
int32_t code = vnodeProcessSyncReq(pVnode->pImpl, pMsg, NULL);
|
int32_t code = vnodeProcessSyncReq(pVnode->pImpl, pMsg, NULL); // no response here
|
||||||
if (code != 0) {
|
|
||||||
if (terrno != 0) code = terrno;
|
|
||||||
dGError("vgId:%d, msg:%p failed to sync since %s", pVnode->vgId, pMsg, terrstr());
|
|
||||||
vmSendRsp(pMsg, code);
|
|
||||||
}
|
|
||||||
|
|
||||||
dGTrace("vgId:%d, msg:%p is freed, code:0x%x", pVnode->vgId, pMsg, code);
|
dGTrace("vgId:%d, msg:%p is freed, code:0x%x", pVnode->vgId, pMsg, code);
|
||||||
rpcFreeCont(pMsg->pCont);
|
rpcFreeCont(pMsg->pCont);
|
||||||
taosFreeQitem(pMsg);
|
taosFreeQitem(pMsg);
|
||||||
|
|
|
@ -73,7 +73,7 @@ static int32_t vnodeSetStandBy(SVnode *pVnode) {
|
||||||
vInfo("vgId:%d, set standby success", TD_VID(pVnode));
|
vInfo("vgId:%d, set standby success", TD_VID(pVnode));
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
vError("vgId:%d, failed to set standby since %s", TD_VID(pVnode), terrstr());
|
vError("vgId:%d, failed to set standby after leader transfer since %s", TD_VID(pVnode), terrstr());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue