From 3751e11394475df2a9915039b0c6ce0c0715fdda Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 25 Jan 2024 17:11:16 +0800 Subject: [PATCH] fix(stream): fix dead lock. --- source/libs/stream/src/streamCheckpoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index 98963967fb..50a010d779 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -317,8 +317,9 @@ int32_t streamSaveTaskCheckpointInfo(SStreamTask* p, int64_t checkpointId) { pCKInfo->checkpointVer = pCKInfo->processedVer; streamTaskClearCheckInfo(p, false); - code = streamTaskHandleEvent(p->status.pSM, TASK_EVENT_CHECKPOINT_DONE); taosThreadMutexUnlock(&p->lock); + + code = streamTaskHandleEvent(p->status.pSM, TASK_EVENT_CHECKPOINT_DONE); } else { stDebug("s-task:%s vgId:%d status:%s not keep the checkpoint metaInfo, checkpoint:%" PRId64 " failed", id, vgId, pStatus->name, pCKInfo->checkpointingId);