diff --git a/client/client.go b/client/client.go index 0bff2158..8425fdcc 100644 --- a/client/client.go +++ b/client/client.go @@ -14,12 +14,19 @@ package client import ( "context" + "sync" "time" + "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/propagation" + "go.opentelemetry.io/otel/sdk/resource" + sdk "go.opentelemetry.io/otel/sdk/trace" + semconv "go.opentelemetry.io/otel/semconv/v1.4.0" + "go.opentelemetry.io/otel/trace" "google.golang.org/grpc" "github.com/milvus-io/milvus-proto/go-api/v2/msgpb" - "github.com/milvus-io/milvus-sdk-go/v2/entity" ) @@ -261,6 +268,46 @@ type Client interface { HybridSearch(ctx context.Context, collName string, partitions []string, limit int, outputFields []string, reranker Reranker, subRequests []*ANNSearchRequest, opts ...SearchQueryOptionFunc) ([]SearchResult, error) } +var ( + initClientOnce sync.Once +) + +func initTracerOnce() { + initClientOnce.Do(func() { + // init trace noop provider + tp := sdk.NewTracerProvider( + sdk.WithBatcher(nil), + sdk.WithResource(resource.NewWithAttributes( + semconv.SchemaURL, + semconv.ServiceNameKey.String("Client"), + )), + sdk.WithSampler(sdk.ParentBased( + sdk.TraceIDRatioBased(1), + )), + ) + otel.SetTracerProvider(tp) + otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{})) + }) +} + +func getUnaryClientInterceptor() grpc.UnaryClientInterceptor { + initTracerOnce() + return otelgrpc.UnaryClientInterceptor(otelgrpc.WithTracerProvider(otel.GetTracerProvider())) + +} + +func StartTrace(ctx context.Context, name string, spanName string) (context.Context, trace.Span, string) { + initTracerOnce() + ctx, span := otel.Tracer(name).Start(ctx, spanName) + return ctx, span, span.SpanContext().TraceID().String() +} + +func StartNewTrace(name string, spanName string) (context.Context, trace.Span, string) { + initTracerOnce() + ctx, span := otel.Tracer(name).Start(context.Background(), spanName) + return ctx, span, span.SpanContext().TraceID().String() +} + // NewClient create a client connected to remote milvus cluster. // More connect option can be modified by Config. func NewClient(ctx context.Context, config Config) (Client, error) { @@ -277,6 +324,7 @@ func NewClient(ctx context.Context, config Config) (Client, error) { // Parse grpc options options := c.config.getDialOption() + options = append(options, grpc.WithChainUnaryInterceptor(getUnaryClientInterceptor())) // Connect the grpc server. if err := c.connect(ctx, addr, options...); err != nil { diff --git a/client/data.go b/client/data.go index 17b82038..22a1cc98 100644 --- a/client/data.go +++ b/client/data.go @@ -20,6 +20,7 @@ import ( "strings" "github.com/cockroachdb/errors" + "go.opentelemetry.io/otel" "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" @@ -40,12 +41,17 @@ const ( ) func (c *GrpcClient) HybridSearch(ctx context.Context, collName string, partitions []string, limit int, outputFields []string, reranker Reranker, subRequests []*ANNSearchRequest, opts ...SearchQueryOptionFunc) ([]SearchResult, error) { + method := "HybridSearch" + ctx, span := otel.Tracer("client").Start(ctx, method) + defer span.End() + traceID := span.SpanContext().TraceID().String() if c.Service == nil { return nil, ErrClientNotReady } collInfo, err := c.getCollectionInfo(ctx, collName) if err != nil { + log.Printf("hybrid search failed, collName:%s, traceID:%s err: %v", collName, traceID, err) return nil, err } schema := collInfo.Schema @@ -85,6 +91,7 @@ func (c *GrpcClient) HybridSearch(ctx context.Context, collName string, partitio err = merr.CheckRPCCall(result, err) if err != nil { + log.Printf("hybrid search failed, collName:%s, traceID:%s err: %v", collName, traceID, err) return nil, err } @@ -95,6 +102,10 @@ func (c *GrpcClient) HybridSearch(ctx context.Context, collName string, partitio func (c *GrpcClient) Search(ctx context.Context, collName string, partitions []string, expr string, outputFields []string, vectors []entity.Vector, vectorField string, metricType entity.MetricType, topK int, sp entity.SearchParam, opts ...SearchQueryOptionFunc, ) ([]SearchResult, error) { + method := "Search" + ctx, span := otel.Tracer("client").Start(ctx, method) + defer span.End() + traceID := span.SpanContext().TraceID().String() if c.Service == nil { return []SearchResult{}, ErrClientNotReady } @@ -116,6 +127,7 @@ func (c *GrpcClient) Search(ctx context.Context, collName string, partitions []s resp, err := c.Service.Search(ctx, req) if err != nil { + log.Printf("search failed, collName:%s, traceID:%s err: %v", collName, traceID, err) return nil, err } if err := handleRespStatus(resp.GetStatus()); err != nil { @@ -292,6 +304,9 @@ func (c *GrpcClient) Get(ctx context.Context, collectionName string, ids entity. // QueryByPks query record by specified primary key(s) func (c *GrpcClient) QueryByPks(ctx context.Context, collectionName string, partitionNames []string, ids entity.Column, outputFields []string, opts ...SearchQueryOptionFunc) (ResultSet, error) { + method := "QueryByPks" + ctx, span := otel.Tracer("client").Start(ctx, method) + defer span.End() if c.Service == nil { return nil, ErrClientNotReady } @@ -310,6 +325,10 @@ func (c *GrpcClient) QueryByPks(ctx context.Context, collectionName string, part // Query performs query by expression. func (c *GrpcClient) Query(ctx context.Context, collectionName string, partitionNames []string, expr string, outputFields []string, opts ...SearchQueryOptionFunc) (ResultSet, error) { + method := "Query" + ctx, span := otel.Tracer("client").Start(ctx, method) + defer span.End() + traceID := span.SpanContext().TraceID().String() if c.Service == nil { return nil, ErrClientNotReady } @@ -352,10 +371,12 @@ func (c *GrpcClient) Query(ctx context.Context, collectionName string, partition resp, err := c.Service.Query(ctx, req) if err != nil { + log.Printf("query failed, collName:%s, traceID:%s err: %v", collectionName, traceID, err) return nil, err } err = handleRespStatus(resp.GetStatus()) if err != nil { + log.Printf("query failed, collName:%s, traceID:%s err: %v", collectionName, traceID, err) return nil, err } @@ -431,6 +452,10 @@ func prepareSearchRequest(collName string, partitions []string, // GetPersistentSegmentInfo get persistent segment info func (c *GrpcClient) GetPersistentSegmentInfo(ctx context.Context, collName string) ([]*entity.Segment, error) { + method := "GetPersistentSegmentInfo" + ctx, span := otel.Tracer("client").Start(ctx, method) + defer span.End() + traceID := span.SpanContext().TraceID().String() if c.Service == nil { return []*entity.Segment{}, ErrClientNotReady } @@ -440,9 +465,11 @@ func (c *GrpcClient) GetPersistentSegmentInfo(ctx context.Context, collName stri } resp, err := c.Service.GetPersistentSegmentInfo(ctx, req) if err != nil { + log.Printf("get persistent segment info failed, collName:%s, traceID:%s err: %v", collName, traceID, err) return []*entity.Segment{}, err } if err := handleRespStatus(resp.GetStatus()); err != nil { + log.Printf("get persistent segment info failed, collName:%s, traceID:%s err: %v", collName, traceID, err) return []*entity.Segment{}, err } segments := make([]*entity.Segment, 0, len(resp.GetInfos())) @@ -461,6 +488,10 @@ func (c *GrpcClient) GetPersistentSegmentInfo(ctx context.Context, collName stri // GetQuerySegmentInfo get query query cluster segment loaded info func (c *GrpcClient) GetQuerySegmentInfo(ctx context.Context, collName string) ([]*entity.Segment, error) { + method := "GetQuerySegmentInfo" + ctx, span := otel.Tracer("client").Start(ctx, method) + defer span.End() + traceID := span.SpanContext().TraceID().String() if c.Service == nil { return []*entity.Segment{}, ErrClientNotReady } @@ -470,6 +501,7 @@ func (c *GrpcClient) GetQuerySegmentInfo(ctx context.Context, collName string) ( } resp, err := c.Service.GetQuerySegmentInfo(ctx, req) if err != nil { + log.Printf("get query segment info failed, collName:%s traceID:%s, err: %v", collName, traceID, err) return []*entity.Segment{}, err } if err := handleRespStatus(resp.GetStatus()); err != nil { @@ -493,6 +525,10 @@ func (c *GrpcClient) GetQuerySegmentInfo(ctx context.Context, collName string) ( func (c *GrpcClient) CalcDistance(ctx context.Context, collName string, partitions []string, metricType entity.MetricType, opLeft, opRight entity.Column, ) (entity.Column, error) { + method := "CalcDistance" + ctx, span := otel.Tracer("client").Start(ctx, method) + defer span.End() + traceID := span.SpanContext().TraceID().String() if c.Service == nil { return nil, ErrClientNotReady } @@ -513,9 +549,11 @@ func (c *GrpcClient) CalcDistance(ctx context.Context, collName string, partitio resp, err := c.Service.CalcDistance(ctx, req) if err != nil { + log.Printf("calc distance failed, collName:%s traceID:%s err: %v", collName, traceID, err) return nil, err } if err := handleRespStatus(resp.GetStatus()); err != nil { + log.Printf("calc distance failed, collName:%s traceID:%s err: %v", collName, traceID, err) return nil, err } diff --git a/go.mod b/go.mod index 1fd838ab..797b79b1 100644 --- a/go.mod +++ b/go.mod @@ -11,8 +11,12 @@ require ( github.com/stretchr/testify v1.8.1 github.com/tidwall/gjson v1.14.4 github.com/x448/float16 v0.8.4 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 + go.opentelemetry.io/otel v1.10.0 + go.opentelemetry.io/otel/sdk v1.10.0 + go.opentelemetry.io/otel/trace v1.10.0 golang.org/x/sync v0.8.0 - google.golang.org/grpc v1.48.0 + google.golang.org/grpc v1.50.1 google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f ) @@ -21,6 +25,8 @@ require ( github.com/cockroachdb/redact v1.1.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/getsentry/sentry-go v0.12.0 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/kr/pretty v0.3.0 // indirect github.com/kr/text v0.2.0 // indirect diff --git a/go.sum b/go.sum index 64969703..9b6b3366 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -63,6 +64,11 @@ github.com/go-faker/faker/v4 v4.1.0 h1:ffuWmpDrducIUOO0QSKSF5Q2dxAht+dhsT9FvVHhP github.com/go-faker/faker/v4 v4.1.0/go.mod h1:uuNc0PSRxF8nMgjGrrrU4Nw5cF30Jc6Kd0/FUTTYbhg= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -99,8 +105,9 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -246,6 +253,14 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= +go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel/sdk v1.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY= +go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= +go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -295,6 +310,7 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -326,6 +342,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -372,9 +389,9 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -396,8 +413,9 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f h1:rqzndB2lIQGivcXdTuY3Y9NBvr70X+y77woofSRluec= google.golang.org/grpc/examples v0.0.0-20220617181431-3e7b97febc7f/go.mod h1:gxndsbNG1n4TZcHGgsYEfVGnTxqfEdfiDv6/DADXX9o= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/test/testcases/collection_test.go b/test/testcases/collection_test.go index 4311f56f..8bebb678 100644 --- a/test/testcases/collection_test.go +++ b/test/testcases/collection_test.go @@ -584,7 +584,7 @@ func TestCreateVarcharArrayInvalidLength(t *testing.T) { common.WithMaxCapacity(100), common.WithMaxLength(invalidLength)) schema := common.GenSchema(common.GenRandomString(6), false, append(fields, arrayField), common.WithEnableDynamicField(true)) err := mc.CreateCollection(ctx, schema, common.DefaultShards) - common.CheckErr(t, err, false, "the maximum length specified for a VarChar should be in (0, 65535]: invalid parameter") + common.CheckErr(t, err, false, "the maximum length specified for a VarChar should be in (0, 1048576]: invalid parameter") } }