From 2159526e80c71a541357f84ee48a21269455821a Mon Sep 17 00:00:00 2001 From: wei liu Date: Thu, 21 Nov 2024 17:26:46 +0800 Subject: [PATCH] fix: Deadlock in compaction handler (#37868) issue: #37803 Signed-off-by: Wei Liu --- internal/datacoord/compaction.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/datacoord/compaction.go b/internal/datacoord/compaction.go index 01fc31358f14a..471151705cc46 100644 --- a/internal/datacoord/compaction.go +++ b/internal/datacoord/compaction.go @@ -303,6 +303,7 @@ func (c *compactionPlanHandler) schedule() []CompactionTask { c.executingGuard.Lock() c.executingTasks[t.GetTaskProto().GetPlanID()] = t if len(c.executingTasks) >= parallelism { + c.executingGuard.Unlock() break // 2. the parallelism of running tasks is reached } c.executingGuard.Unlock()