fix(stream): transfer state should wait for the checkpoint generating completed.

This commit is contained in:
Haojun Liao 2023-09-01 09:50:45 +08:00
parent e8294ed8dc
commit bce46f1be8
1 changed files with 7 additions and 0 deletions

View File

@ -917,6 +917,13 @@ void streamTaskHalt(SStreamTask* pTask) {
return;
}
// wait for checkpoint completed
while(pTask->status.taskStatus == TASK_STATUS__CK) {
qDebug("s-task:%s status:%s during generating checkpoint, wait for 1sec and retry set status:halt", pTask->id.idStr,
streamGetTaskStatusStr(TASK_STATUS__CK));
taosMsleep(1000);
}
// upgrade to halt status
if (status == TASK_STATUS__PAUSE) {
qDebug("s-task:%s upgrade status to %s from %s", pTask->id.idStr, streamGetTaskStatusStr(TASK_STATUS__HALT),