Set qcv2 index task priority to Low (#28117) (#28134)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/28125/head
congqixia 2023-11-03 01:30:16 +08:00 committed by GitHub
parent 0fbfa5a9b0
commit 02f4d145ca
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
}