fix: Pass cluster id tranforming drop task to drop job request (#42531)

Related to #42530

The cluster id is missing when drop worker drop causing redoing task on
report duplicated task error.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-06-05 13:20:32 +08:00 committed by GitHub
parent 0567f512b3
commit 373deba0bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -812,9 +812,14 @@ func (node *DataNode) DropTask(ctx context.Context, request *workerpb.DropTaskRe
if err != nil { if err != nil {
return merr.Status(err), nil return merr.Status(err), nil
} }
clusterID, err := properties.GetClusterID()
if err != nil {
return merr.Status(err), nil
}
return node.DropJobsV2(ctx, &workerpb.DropJobsV2Request{ return node.DropJobsV2(ctx, &workerpb.DropJobsV2Request{
TaskIDs: []int64{taskID}, ClusterID: clusterID,
JobType: jobType, TaskIDs: []int64{taskID},
JobType: jobType,
}) })
default: default:
err := fmt.Errorf("unrecognized task type '%s', properties=%v", taskType, request.GetProperties()) err := fmt.Errorf("unrecognized task type '%s', properties=%v", taskType, request.GetProperties())