From 66d577d1342dd0704bbe3c1e58f8bf89f675c44f Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 13 Jul 2023 15:04:39 +0800 Subject: [PATCH] fix(stream): abort exec when task is dropped. --- source/libs/stream/src/streamExec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index fc0003e20a..298d585481 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -404,7 +404,12 @@ int32_t streamExecForAll(SStreamTask* pTask) { while (pTask->taskLevel == TASK_LEVEL__SOURCE) { int8_t status = atomic_load_8(&pTask->status.taskStatus); if (status == TASK_STATUS__DROPPING) { - break; + if (pInput != NULL) { + streamFreeQitem(pInput); + } + + qError("s-task:%s task is dropped, abort exec", id); + return TSDB_CODE_SUCCESS; } if (status != TASK_STATUS__NORMAL && status != TASK_STATUS__PAUSE && status != TASK_STATUS__STOP) {