Skip to content

Commit

Permalink
fix: Check whether compaction plan exist before update (#28826)
Browse files Browse the repository at this point in the history
Fix: #28825

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Nov 29, 2023
1 parent 3b1b14d commit 3f9da2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/datacoord/compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ func (c *compactionPlanHandler) removeTasksByChannel(channel string) {
func (c *compactionPlanHandler) updateTask(planID int64, opts ...compactionTaskOpt) {
c.mu.Lock()
defer c.mu.Unlock()
c.plans[planID] = c.plans[planID].shadowClone(opts...)
plan, ok := c.plans[planID]
if !ok {
return
}
c.plans[planID] = plan.shadowClone(opts...)
}

func (c *compactionPlanHandler) enqueuePlan(signal *compactionSignal, plan *datapb.CompactionPlan) error {
Expand Down

0 comments on commit 3f9da2b

Please sign in to comment.