From ab4e2ebc3ab4458df14831ab520fd4289eb28d9d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 7 Jul 2023 21:45:22 +0800 Subject: [PATCH] fix(stream): fix bug that causes the endless loop. --- source/libs/stream/src/streamExec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 051c664c53..89fcecda39 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -403,6 +403,10 @@ int32_t streamExecForAll(SStreamTask* pTask) { // wait for the task to be ready to go while (pTask->taskLevel == TASK_LEVEL__SOURCE) { int8_t status = atomic_load_8(&pTask->status.taskStatus); + if (status == TASK_STATUS__DROPPING) { + break; + } + if (status != TASK_STATUS__NORMAL && status != TASK_STATUS__PAUSE) { qError("stream task wait for the end of fill history, s-task:%s, status:%d", id, status); taosMsleep(100);