fix: fetch last ack invalid write issue
This commit is contained in:
parent
9a64317881
commit
4224616e8a
|
@ -1049,12 +1049,16 @@ _return:
|
||||||
|
|
||||||
if (code || rsp) {
|
if (code || rsp) {
|
||||||
bool rsped = false;
|
bool rsped = false;
|
||||||
|
|
||||||
|
ctx = NULL;
|
||||||
|
(void)qwAcquireTaskCtx(QW_FPARAMS(), &ctx);
|
||||||
|
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
qwDbgSimulateRedirect(qwMsg, ctx, &rsped);
|
qwDbgSimulateRedirect(qwMsg, ctx, &rsped);
|
||||||
qwDbgSimulateDead(QW_FPARAMS(), ctx, &rsped);
|
qwDbgSimulateDead(QW_FPARAMS(), ctx, &rsped);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rsped) {
|
if (!rsped && ctx) {
|
||||||
code = qwBuildAndSendFetchRsp(ctx, qwMsg->msgType + 1, &qwMsg->connInfo, rsp, dataLen, code);
|
code = qwBuildAndSendFetchRsp(ctx, qwMsg->msgType + 1, &qwMsg->connInfo, rsp, dataLen, code);
|
||||||
if (TSDB_CODE_SUCCESS != code) {
|
if (TSDB_CODE_SUCCESS != code) {
|
||||||
QW_TASK_ELOG("fetch rsp send fail, msgType:%s, handle:%p, code:%x - %s, dataLen:%d",
|
QW_TASK_ELOG("fetch rsp send fail, msgType:%s, handle:%p, code:%x - %s, dataLen:%d",
|
||||||
|
@ -1067,6 +1071,8 @@ _return:
|
||||||
qwFreeFetchRsp(rsp);
|
qwFreeFetchRsp(rsp);
|
||||||
rsp = NULL;
|
rsp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qwReleaseTaskCtx(mgmt, ctx);
|
||||||
} else {
|
} else {
|
||||||
// qwQuickRspFetchReq(QW_FPARAMS(), ctx, qwMsg, code);
|
// qwQuickRspFetchReq(QW_FPARAMS(), ctx, qwMsg, code);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue