fix(stream): update checkpoint info only it is in ck status.
This commit is contained in:
parent
dfa74f82d7
commit
506a72d50f
|
@ -567,14 +567,13 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV
|
||||||
ASSERT(pInfo->checkpointId <= pReq->checkpointId && pInfo->checkpointVer <= pReq->checkpointVer &&
|
ASSERT(pInfo->checkpointId <= pReq->checkpointId && pInfo->checkpointVer <= pReq->checkpointVer &&
|
||||||
pInfo->processedVer <= pReq->checkpointVer);
|
pInfo->processedVer <= pReq->checkpointVer);
|
||||||
|
|
||||||
|
// update only it is in checkpoint status.
|
||||||
|
if (pStatus.state == TASK_STATUS__CK) {
|
||||||
pInfo->checkpointId = pReq->checkpointId;
|
pInfo->checkpointId = pReq->checkpointId;
|
||||||
pInfo->checkpointVer = pReq->checkpointVer;
|
pInfo->checkpointVer = pReq->checkpointVer;
|
||||||
pInfo->checkpointTime = pReq->checkpointTs;
|
pInfo->checkpointTime = pReq->checkpointTs;
|
||||||
|
|
||||||
streamTaskClearCheckInfo(pTask, true);
|
streamTaskClearCheckInfo(pTask, true);
|
||||||
|
|
||||||
if (pStatus.state == TASK_STATUS__CK) {
|
|
||||||
// todo handle error
|
|
||||||
code = streamTaskHandleEvent(pTask->status.pSM, TASK_EVENT_CHECKPOINT_DONE);
|
code = streamTaskHandleEvent(pTask->status.pSM, TASK_EVENT_CHECKPOINT_DONE);
|
||||||
} else {
|
} else {
|
||||||
stDebug("s-task:0x%x vgId:%d not handle checkpoint-done event, status:%s", pReq->taskId, vgId, pStatus.name);
|
stDebug("s-task:0x%x vgId:%d not handle checkpoint-done event, status:%s", pReq->taskId, vgId, pStatus.name);
|
||||||
|
|
Loading…
Reference in New Issue