feature/qnode
This commit is contained in:
parent
3295507835
commit
c33f31b6d5
|
@ -52,16 +52,14 @@ void qExplainFreeCtx(SExplainCtx *pCtx) {
|
|||
void *pIter = taosHashIterate(pCtx->groupHash, NULL);
|
||||
while (pIter) {
|
||||
SExplainGroup *group = (SExplainGroup *)pIter;
|
||||
if (NULL == group->nodeExecInfo) {
|
||||
continue;
|
||||
if (group->nodeExecInfo) {
|
||||
int32_t num = taosArrayGetSize(group->nodeExecInfo);
|
||||
for (int32_t i = 0; i < num; ++i) {
|
||||
SExplainRsp *rsp = taosArrayGet(group->nodeExecInfo, i);
|
||||
taosMemoryFreeClear(rsp->subplanInfo);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t num = taosArrayGetSize(group->nodeExecInfo);
|
||||
for (int32_t i = 0; i < num; ++i) {
|
||||
SExplainRsp *rsp = taosArrayGet(group->nodeExecInfo, i);
|
||||
taosMemoryFreeClear(rsp->subplanInfo);
|
||||
}
|
||||
|
||||
pIter = taosHashIterate(pCtx->groupHash, pIter);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ typedef struct SQWConnInfo {
|
|||
|
||||
typedef struct SQWMsg {
|
||||
void *node;
|
||||
int32_t code;
|
||||
char *msg;
|
||||
int32_t msgLen;
|
||||
SQWConnInfo connInfo;
|
||||
|
|
|
@ -536,6 +536,8 @@ int32_t qwDropTask(QW_FPARAMS_DEF) {
|
|||
QW_ERR_RET(qwDropTaskStatus(QW_FPARAMS()));
|
||||
QW_ERR_RET(qwDropTaskCtx(QW_FPARAMS()));
|
||||
|
||||
QW_TASK_DLOG_E("task is dropped");
|
||||
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1239,8 +1241,10 @@ int32_t qwProcessDrop(QW_FPARAMS_DEF, SQWMsg *qwMsg) {
|
|||
QW_ERR_JRET(qwKillTaskHandle(QW_FPARAMS(), ctx));
|
||||
qwUpdateTaskStatus(QW_FPARAMS(), JOB_TASK_STATUS_DROPPING);
|
||||
} else if (ctx->phase > 0) {
|
||||
qwBuildAndSendDropRsp(&qwMsg->connInfo, code);
|
||||
QW_TASK_DLOG("drop rsp send, handle:%p, code:%x - %s", qwMsg->connInfo.handle, code, tstrerror(code));
|
||||
if (0 == qwMsg->code) {
|
||||
qwBuildAndSendDropRsp(&qwMsg->connInfo, code);
|
||||
QW_TASK_DLOG("drop rsp send, handle:%p, code:%x - %s", qwMsg->connInfo.handle, code, tstrerror(code));
|
||||
}
|
||||
|
||||
QW_ERR_JRET(qwDropTask(QW_FPARAMS()));
|
||||
rsped = true;
|
||||
|
@ -1273,7 +1277,7 @@ _return:
|
|||
qwReleaseTaskCtx(mgmt, ctx);
|
||||
}
|
||||
|
||||
if (TSDB_CODE_SUCCESS != code) {
|
||||
if ((TSDB_CODE_SUCCESS != code) && (0 == qwMsg->code)) {
|
||||
qwBuildAndSendDropRsp(&qwMsg->connInfo, code);
|
||||
QW_TASK_DLOG("drop rsp send, handle:%p, code:%x - %s", qwMsg->connInfo.handle, code, tstrerror(code));
|
||||
}
|
||||
|
|
|
@ -549,7 +549,7 @@ int32_t qWorkerProcessDropMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg) {
|
|||
uint64_t tId = msg->taskId;
|
||||
int64_t rId = msg->refId;
|
||||
|
||||
SQWMsg qwMsg = {.node = node, .msg = NULL, .msgLen = 0};
|
||||
SQWMsg qwMsg = {.node = node, .msg = NULL, .msgLen = 0, .code = pMsg->code};
|
||||
qwMsg.connInfo.handle = pMsg->handle;
|
||||
qwMsg.connInfo.ahandle = pMsg->ahandle;
|
||||
|
||||
|
|
Loading…
Reference in New Issue