Merge pull request #5906 from taosdata/fix/TD-3850

[TD-3850]<fix>: fix vnode write enqueue flowctrl UAF & no response
This commit is contained in:
Shengliang Guan 2021-04-25 12:45:00 +08:00 committed by GitHub
commit 2e1a581575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -347,9 +347,11 @@ static void vnodeFlowCtrlMsgToWQueue(void *param, void *tmrId) {
vDebug("vgId:%d, msg:%p, write into vwqueue after flowctrl, retry:%d", pVnode->vgId, pWrite,
pWrite->processedCount);
pWrite->processedCount = 0;
void *handle = pWrite->rpcMsg.handle;
code = vnodeWriteToWQueueImp(pWrite);
if (code != 0) {
dnodeSendRpcVWriteRsp(pWrite->pVnode, pWrite, code);
if (code != TSDB_CODE_SUCCESS) {
SRpcMsg rpcRsp = {.handle = handle, .code = code};
rpcSendResponse(&rpcRsp);
}
}
}