Skip to content

Commit

Permalink
fix: [cherry-pick] Check whether compaction plan exist before update(m…
Browse files Browse the repository at this point in the history
…ilvus-io#28826) (milvus-io#28892)

pr: milvus-io#28826 
Fix milvus-io#28825

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
  • Loading branch information
congqixia authored Dec 4, 2023
1 parent d2c1713 commit f4468df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/datacoord/compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ func (c *compactionPlanHandler) stop() {
func (c *compactionPlanHandler) updateTask(planID int64, opts ...compactionTaskOpt) {
c.mu.Lock()
defer c.mu.Unlock()
c.plans[planID] = c.plans[planID].shadowClone(opts...)
if plan, ok := c.plans[planID]; ok {
c.plans[planID] = plan.shadowClone(opts...)
}
}

// execCompactionPlan start to execute plan and return immediately
Expand Down

0 comments on commit f4468df

Please sign in to comment.