Add sourceID output for task.String and fill reduce channel reason (#26447)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/26432/head
congqixia 2023-08-18 13:50:19 +08:00 committed by GitHub
parent bdc8c507ea
commit 065d1a962e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -71,7 +71,9 @@ func (c *ChannelChecker) Check(ctx context.Context) []task.Task {
channels := c.dist.ChannelDistManager.GetAll()
released := utils.FilterReleased(channels, collectionIDs)
tasks = append(tasks, c.createChannelReduceTasks(ctx, released, -1)...)
releaseTasks := c.createChannelReduceTasks(ctx, released, -1)
task.SetReason("collection released", releaseTasks...)
tasks = append(tasks, releaseTasks...)
return tasks
}

View File

@ -249,9 +249,10 @@ func (task *baseTask) String() string {
}
}
return fmt.Sprintf(
"[id=%d] [type=%s] [reason=%s] [collectionID=%d] [replicaID=%d] [priority=%s] [actionsCount=%d] [actions=%s]",
"[id=%d] [type=%s] [source=%d] [reason=%s] [collectionID=%d] [replicaID=%d] [priority=%s] [actionsCount=%d] [actions=%s]",
task.id,
GetTaskType(task).String(),
task.sourceID,
task.reason,
task.collectionID,
task.replicaID,