diff --git a/internal/datacoord/compaction.go b/internal/datacoord/compaction.go index ac1abf03e1..3707e15cbd 100644 --- a/internal/datacoord/compaction.go +++ b/internal/datacoord/compaction.go @@ -327,6 +327,8 @@ func (c *compactionPlanHandler) schedule() []CompactionTask { // Do not move this check logic outside the lock; it needs to remain mutually exclusive with the stats task. if t.GetTaskProto().GetType() == datapb.CompactionType_Level0DeleteCompaction { if !t.PreparePlan() { + selected = selected[:len(selected)-1] + excluded = append(excluded, t) c.executingGuard.Unlock() continue }