Merge pull request #22001 from taosdata/fix/liaohj

fix(stream): fix bug that causes the endless loop.
This commit is contained in:
Haojun Liao 2023-07-08 08:47:41 +08:00 committed by GitHub
commit 9da937ada5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

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