From c99f4347067bd02a847bbb5f6f2bf8c11ae4cb0a Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 24 Oct 2023 10:14:29 +0800 Subject: [PATCH] fix(stream): set checkpoint failure when in pause status. --- source/dnode/vnode/src/tq/tq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 7c67f3cd9b..c8fec925db 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -1750,7 +1750,9 @@ int32_t tqProcessTaskCheckPointSourceReq(STQ* pTq, SRpcMsg* pMsg, SRpcMsg* pRsp) // todo save the checkpoint failed info taosThreadMutexLock(&pTask->lock); - if (streamTaskGetStatus(pTask, NULL) == TASK_STATUS__HALT) { + ETaskStatus status = streamTaskGetStatus(pTask, NULL); + + if (status == TASK_STATUS__HALT || status == TASK_STATUS__PAUSE) { qError("s-task:%s not ready for checkpoint, since it is halt, ignore this checkpoint:%" PRId64 ", set it failure", pTask->id.idStr, req.checkpointId); taosThreadMutexUnlock(&pTask->lock);