diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c index 4a9eea66e2..5dd43ca064 100644 --- a/source/libs/qworker/src/qworker.c +++ b/source/libs/qworker/src/qworker.c @@ -746,9 +746,19 @@ _return: } int32_t qwAbortPrerocessQuery(QW_FPARAMS_DEF) { - QW_ERR_RET(qwDropTask(QW_FPARAMS())); + int32_t code = TSDB_CODE_SUCCESS; + SQWTaskCtx *ctx = NULL; - return TSDB_CODE_SUCCESS; + QW_ERR_RET(qwAcquireTaskCtx(QW_FPARAMS(), &ctx)); + + QW_LOCK(QW_WRITE, &ctx->lock); + QW_ERR_JRET(qwDropTask(QW_FPARAMS())); + +_return: + + QW_UNLOCK(QW_WRITE, &ctx->lock); + + return code; } int32_t qwPreprocessQuery(QW_FPARAMS_DEF, SQWMsg *qwMsg) { diff --git a/source/util/inc/tmempoolInt.h b/source/util/inc/tmempoolInt.h index 8d4cb57ddc..013838e6df 100755 --- a/source/util/inc/tmempoolInt.h +++ b/source/util/inc/tmempoolInt.h @@ -222,7 +222,7 @@ typedef struct SMPSessionChunk { } SMPSessionChunk; typedef struct SMPSession { - // SMPListNode list; + SMPListNode list; char* sessionId; SMPJob* pJob;