diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index e25a8d3a71..0fb9e3d9f6 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -1109,6 +1109,9 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { streamSourceScanHistoryData(pTask); } + // disable the pause when handling the step2 scan of tsdb data. + // the whole next procedure cann't be stopped. + // todo fix it: the following procedure should be executed completed and then shutdown when trying to close vnode. if (pTask->info.fillHistory == 1) { streamTaskDisablePause(pTask); } @@ -1153,7 +1156,9 @@ int32_t tqProcessTaskScanHistory(STQ* pTq, SRpcMsg* pMsg) { taosMsleep(100); } + // todo fix the race condition, when pause msg is received from mnode, add lock here // now we can stop the stream task execution + ASSERT(pStreamTask->status.taskStatus == TASK_STATUS__NORMAL); pStreamTask->status.taskStatus = TASK_STATUS__HALT; // todo disable the pause diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 49b8231336..c2f676e5b2 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -571,7 +571,7 @@ int32_t streamExecForAll(SStreamTask* pTask) { } bool streamTaskIsIdle(const SStreamTask* pTask) { - return (pTask->status.schedStatus == TASK_SCHED_STATUS__INACTIVE/* && pTask->status.taskStatus != TASK_STATUS__HALT*/); + return (pTask->status.schedStatus == TASK_SCHED_STATUS__INACTIVE); } int32_t streamTryExec(SStreamTask* pTask) {