From 3ae8916384c6d09ae40f4c29bd80bb5a0db26710 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 1 Jul 2024 14:59:55 +0800 Subject: [PATCH] fix(stream): add more check for checkpoint info update for leader. --- source/libs/stream/src/streamCheckpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index 2ee2abe65e..bc973f17d7 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -447,7 +447,7 @@ int32_t streamTaskUpdateTaskCheckpointInfo(SStreamTask* pTask, bool restored, SV SStreamTaskState* pStatus = streamTaskGetStatus(pTask); - if (restored && (pStatus->state != TASK_STATUS__CK)) { + if (restored && (pStatus->state != TASK_STATUS__CK) && (pMeta->role == NODE_ROLE_LEADER)) { stDebug("s-task:0x%x vgId:%d restored:%d status:%s not update checkpoint-info, checkpointId:%" PRId64 "->%" PRId64 " failed", pReq->taskId, vgId, restored, pStatus->name, pInfo->checkpointId, pReq->checkpointId);