Skip to content

Commit

Permalink
fix: Fix proxy panic after Import related api failed (milvus-io#35540) (
Browse files Browse the repository at this point in the history
  • Loading branch information
weiliu1031 authored Aug 19, 2024
1 parent 14ec3dc commit fc344d1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/proxy/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -4755,18 +4755,33 @@ func convertToV1ListImportResponse(rsp *internalpb.ListImportsResponse) *milvusp
// Import data files(json, numpy, etc.) on MinIO/S3 storage, read and parse them into sealed segments
func (node *Proxy) Import(ctx context.Context, req *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error) {
rsp, err := node.ImportV2(ctx, convertToV2ImportRequest(req))
if err != nil {
return &milvuspb.ImportResponse{
Status: merr.Status(err),
}, nil
}
return convertToV1ImportResponse(rsp), err
}

// GetImportState checks import task state from RootCoord.
func (node *Proxy) GetImportState(ctx context.Context, req *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error) {
rsp, err := node.GetImportProgress(ctx, convertToV2GetImportRequest(req))
if err != nil {
return &milvuspb.GetImportStateResponse{
Status: merr.Status(err),
}, nil
}
return convertToV1GetImportResponse(rsp), err
}

// ListImportTasks get id array of all import tasks from rootcoord
func (node *Proxy) ListImportTasks(ctx context.Context, req *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error) {
rsp, err := node.ListImports(ctx, convertToV2ListImportRequest(req))
if err != nil {
return &milvuspb.ListImportTasksResponse{
Status: merr.Status(err),
}, nil
}
return convertToV1ListImportResponse(rsp), err
}

Expand Down

0 comments on commit fc344d1

Please sign in to comment.