Merge pull request #29245 from taosdata/fix/fetch.crash

fix: fetch last ack invalid write issue
This commit is contained in:
Shengliang Guan 2024-12-20 17:17:42 +08:00 committed by GitHub
commit 99377ae833
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -1049,12 +1049,16 @@ _return:
if (code || rsp) {
bool rsped = false;
ctx = NULL;
(void)qwAcquireTaskCtx(QW_FPARAMS(), &ctx);
if (ctx) {
qwDbgSimulateRedirect(qwMsg, ctx, &rsped);
qwDbgSimulateDead(QW_FPARAMS(), ctx, &rsped);
}
if (!rsped) {
if (!rsped && ctx) {
code = qwBuildAndSendFetchRsp(ctx, qwMsg->msgType + 1, &qwMsg->connInfo, rsp, dataLen, code);
if (TSDB_CODE_SUCCESS != code) {
QW_TASK_ELOG("fetch rsp send fail, msgType:%s, handle:%p, code:%x - %s, dataLen:%d",
@ -1067,6 +1071,8 @@ _return:
qwFreeFetchRsp(rsp);
rsp = NULL;
}
qwReleaseTaskCtx(mgmt, ctx);
} else {
// qwQuickRspFetchReq(QW_FPARAMS(), ctx, qwMsg, code);
}