Merge pull request #22056 from taosdata/fix/task_drop

fix(stream): abort exec when task is dropped.
This commit is contained in:
Haojun Liao 2023-07-13 16:10:40 +08:00 committed by GitHub
commit 5afc576b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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) {