fix(stream): add more check.

This commit is contained in:
Haojun Liao 2023-08-01 14:31:41 +08:00
parent e11cda17c0
commit f1e0e64918
1 changed files with 3 additions and 2 deletions

View File

@ -304,11 +304,12 @@ static int32_t streamDoTransferStateToStreamTask(SStreamTask* pTask) {
STimeWindow* pTimeWindow = &pStreamTask->dataRange.window; STimeWindow* pTimeWindow = &pStreamTask->dataRange.window;
// todo. the dropping status should be append to the status after the halt completed.
// It must be halted for a source stream task, since when the related scan-history-data task start scan the history // It must be halted for a source stream task, since when the related scan-history-data task start scan the history
// for the step 2. For a agg task // for the step 2.
int8_t status = pStreamTask->status.taskStatus; int8_t status = pStreamTask->status.taskStatus;
if (pStreamTask->info.taskLevel == TASK_LEVEL__SOURCE) { if (pStreamTask->info.taskLevel == TASK_LEVEL__SOURCE) {
ASSERT(status == TASK_STATUS__HALT); ASSERT(status == TASK_STATUS__HALT || status == TASK_STATUS__DROPPING);
} else { } else {
ASSERT(status == TASK_STATUS__SCAN_HISTORY); ASSERT(status == TASK_STATUS__SCAN_HISTORY);
pStreamTask->status.taskStatus = TASK_STATUS__HALT; pStreamTask->status.taskStatus = TASK_STATUS__HALT;