Set qcv2 index task priority to Low (#28117)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/28258/head
congqixia 2023-11-02 23:22:17 +08:00 committed by GitHub
parent 9b737b77a7
commit 5d2eba2c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -146,7 +146,7 @@ func (c *IndexChecker) getSealedSegmentsDist(replica *meta.Replica) []*meta.Segm
func (c *IndexChecker) createSegmentUpdateTask(ctx context.Context, segment *meta.Segment, replica *meta.Replica) (task.Task, bool) {
action := task.NewSegmentActionWithScope(segment.Node, task.ActionTypeUpdate, segment.GetInsertChannel(), segment.GetID(), querypb.DataScope_Historical)
task, err := task.NewSegmentTask(
t, err := task.NewSegmentTask(
ctx,
params.Params.QueryCoordCfg.SegmentTaskTimeout.GetAsDuration(time.Millisecond),
c.ID(),
@ -163,6 +163,8 @@ func (c *IndexChecker) createSegmentUpdateTask(ctx context.Context, segment *met
)
return nil, false
}
task.SetReason("missing index")
return task, true
// index task shall have lower or equal priority than balance task
t.SetPriority(task.TaskPriorityLow)
t.SetReason("missing index")
return t, true
}