Set reason for balance, index checker generated tasks (#25865)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/25869/head
congqixia 2023-07-24 17:07:00 +08:00 committed by GitHub
parent 8e5d6193f9
commit 76e03fe6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -148,9 +148,11 @@ func (b *BalanceChecker) Check(ctx context.Context) []task.Task {
tasks := balance.CreateSegmentTasksFromPlans(ctx, b.ID(), Params.QueryCoordCfg.SegmentTaskTimeout.GetAsDuration(time.Millisecond), segmentPlans) tasks := balance.CreateSegmentTasksFromPlans(ctx, b.ID(), Params.QueryCoordCfg.SegmentTaskTimeout.GetAsDuration(time.Millisecond), segmentPlans)
task.SetPriority(task.TaskPriorityLow, tasks...) task.SetPriority(task.TaskPriorityLow, tasks...)
task.SetReason("segment unbalanced", tasks...)
ret = append(ret, tasks...) ret = append(ret, tasks...)
tasks = balance.CreateChannelTasksFromPlans(ctx, b.ID(), Params.QueryCoordCfg.ChannelTaskTimeout.GetAsDuration(time.Millisecond), channelPlans) tasks = balance.CreateChannelTasksFromPlans(ctx, b.ID(), Params.QueryCoordCfg.ChannelTaskTimeout.GetAsDuration(time.Millisecond), channelPlans)
task.SetReason("channel unbalanced", tasks...)
ret = append(ret, tasks...) ret = append(ret, tasks...)
return ret return ret
} }

View File

@ -157,5 +157,6 @@ func (c *IndexChecker) createSegmentUpdateTask(ctx context.Context, segment *met
) )
return nil, false return nil, false
} }
task.SetReason("missing index")
return task, true return task, true
} }