diff --git a/internal/proxy/impl.go b/internal/proxy/impl.go index e44a212846..8a4931c278 100644 --- a/internal/proxy/impl.go +++ b/internal/proxy/impl.go @@ -1952,7 +1952,7 @@ func (node *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDista } if retrievedIds == nil || retrievedVectors == nil { - return nil, errors.New("Failed to fetch vectors") + return nil, errors.New("failed to fetch vectors") } dict := make(map[int64]int) @@ -1969,7 +1969,7 @@ func (node *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDista index, ok := dict[id] if !ok { log.Error("id not found in CalcDistance", zap.Int64("id", id)) - return nil, errors.New("Failed to fetch vectors by id: " + fmt.Sprintln(id)) + return nil, errors.New("failed to fetch vectors by id: " + fmt.Sprintln(id)) } result = append(result, floatArr[int64(index)*element:int64(index+1)*element]...) } @@ -1996,7 +1996,7 @@ func (node *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDista index, ok := dict[id] if !ok { log.Error("id not found in CalcDistance", zap.Int64("id", id)) - return nil, errors.New("Failed to fetch vectors by id: " + fmt.Sprintln(id)) + return nil, errors.New("failed to fetch vectors by id: " + fmt.Sprintln(id)) } result = append(result, binaryArr[int64(index)*element:int64(index+1)*element]...) } @@ -2009,7 +2009,7 @@ func (node *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDista }, nil } - return nil, errors.New("Failed to fetch vectors") + return nil, errors.New("failed to fetch vectors") } log.Debug("grpc calcDistance begin") @@ -2154,9 +2154,9 @@ func (node *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDista } } - err = errors.New("Unexpected error") + err = errors.New("unexpected error") if (vectorsLeft.GetBinaryVector() != nil && vectorsRight.GetFloatVector() != nil) || (vectorsLeft.GetFloatVector() != nil && vectorsRight.GetBinaryVector() != nil) { - err = errors.New("Cannot calculate distance between binary vectors and float vectors") + err = errors.New("cannot calculate distance between binary vectors and float vectors") } return &milvuspb.CalcDistanceResults{ diff --git a/internal/proxy/segment.go b/internal/proxy/segment.go index 15623eb10d..6c9ca02286 100644 --- a/internal/proxy/segment.go +++ b/internal/proxy/segment.go @@ -391,7 +391,7 @@ func (sa *segIDAssigner) GetSegmentID(collID UniqueID, partitionID UniqueID, cha } sa.Reqs <- req if err := req.Wait(); err != nil { - return nil, fmt.Errorf("GetSegmentID failed: %s", err) + return nil, fmt.Errorf("getSegmentID failed: %s", err) } return req.segInfo, nil diff --git a/internal/proxy/segment_test.go b/internal/proxy/segment_test.go index 249454f5de..1f08e1060d 100644 --- a/internal/proxy/segment_test.go +++ b/internal/proxy/segment_test.go @@ -251,7 +251,7 @@ func (mockD *mockDataCoord5) AssignSegmentID(ctx context.Context, req *datapb.As ErrorCode: commonpb.ErrorCode_UnexpectedError, Reason: "Just For Test", }, - }, fmt.Errorf("Just for test") + }, fmt.Errorf("just for test") } func TestSegmentAllocator5(t *testing.T) {