From c5e54a35a0a35829a87fda411a8d9a1316fcd1e2 Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 24 Oct 2024 17:09:28 +0800 Subject: [PATCH] enhance: [2.4] Expose GetIndexBuildProgress and bump version (#838) Cherry pick #833 With extra change: - Refine unit test of `GetIndexBuildProgress` - Change internal API to `DescribeIndex` - Bump version to v2.4.2 --------- Signed-off-by: Congqi Xia --- client/client.go | 2 + client/index.go | 29 ++++----- client/index_test.go | 144 ++++++++++++++++++++++++++---------------- common/common.go | 2 +- test/testcases/ut.log | 109 -------------------------------- 5 files changed, 107 insertions(+), 179 deletions(-) delete mode 100644 test/testcases/ut.log diff --git a/client/client.go b/client/client.go index b1847265..263e85e0 100644 --- a/client/client.go +++ b/client/client.go @@ -129,6 +129,8 @@ type Client interface { GetIndexState(ctx context.Context, collName string, fieldName string, opts ...IndexOption) (entity.IndexState, error) // AlterIndex modifies the index params. AlterIndex(ctx context.Context, collName, indexName string, opts ...IndexOption) error + // GetIndexBuildProgress get index building progress + GetIndexBuildProgress(ctx context.Context, collName string, fieldName string, opts ...IndexOption) (total, indexed int64, err error) // -- basic operation -- diff --git a/client/index.go b/client/index.go index 97d3ef77..ef0b6950 100644 --- a/client/index.go +++ b/client/index.go @@ -17,6 +17,7 @@ import ( "strconv" "time" + "github.com/cockroachdb/errors" "github.com/milvus-io/milvus-proto/go-api/v2/commonpb" "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" "github.com/milvus-io/milvus-sdk-go/v2/entity" @@ -104,7 +105,8 @@ func getIndexDef(opts ...IndexOption) indexDef { // CreateIndex create index for collection // Deprecated please use CreateIndexV2 instead. func (c *GrpcClient) CreateIndex(ctx context.Context, collName string, fieldName string, - idx entity.Index, async bool, opts ...IndexOption) error { + idx entity.Index, async bool, opts ...IndexOption, +) error { if c.Service == nil { return ErrClientNotReady } @@ -219,7 +221,7 @@ func (c *GrpcClient) DropIndex(ctx context.Context, collName string, fieldName s idxDef := getIndexDef(opts...) req := &milvuspb.DropIndexRequest{ Base: idxDef.MsgBase, - DbName: "", //reserved, + DbName: "", // reserved, CollectionName: collName, FieldName: fieldName, IndexName: idxDef.name, @@ -267,25 +269,20 @@ func (c *GrpcClient) GetIndexBuildProgress(ctx context.Context, collName string, if c.Service == nil { return 0, 0, ErrClientNotReady } - if err := c.checkCollField(ctx, collName, fieldName); err != nil { - return 0, 0, err - } - idxDef := getIndexDef(opts...) - req := &milvuspb.GetIndexBuildProgressRequest{ - DbName: "", - CollectionName: collName, - FieldName: fieldName, - IndexName: idxDef.name, - } - resp, err := c.Service.GetIndexBuildProgress(ctx, req) + results, err := c.describeIndex(ctx, collName, fieldName, opts...) if err != nil { return 0, 0, err } - if err = handleRespStatus(resp.GetStatus()); err != nil { - return 0, 0, err + if len(results) == 0 { + return 0, 0, errors.New("index not found") + } + + idxDesc := results[0] + if idxDesc.GetState() == commonpb.IndexState_Failed { + return 0, 0, errors.Newf("index build failed: %s", idxDesc.IndexStateFailReason) } - return resp.GetTotalRows(), resp.GetIndexedRows(), nil + return idxDesc.GetTotalRows(), idxDesc.GetIndexedRows(), nil } func (c *GrpcClient) describeIndex(ctx context.Context, collName string, fieldName string, opts ...IndexOption) ([]*milvuspb.IndexDescription, error) { diff --git a/client/index_test.go b/client/index_test.go index 323ef7c6..3babd444 100644 --- a/client/index_test.go +++ b/client/index_test.go @@ -2,6 +2,7 @@ package client import ( "context" + "fmt" "math/rand" "testing" "time" @@ -13,6 +14,8 @@ import ( "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb" "github.com/milvus-io/milvus-sdk-go/v2/entity" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/suite" ) func TestGrpcClientCreateIndex(t *testing.T) { @@ -151,67 +154,102 @@ func TestGrpcClientDescribeIndex(t *testing.T) { }) } -func TestGrpcGetIndexBuildProgress(t *testing.T) { - ctx := context.Background() - mockServer.SetInjection(MHasCollection, hasCollectionDefault) - mockServer.SetInjection(MDescribeCollection, describeCollectionInjection(t, 0, testCollectionName, defaultSchema())) +type IndexSuite struct { + MockSuiteBase +} - tc := testClient(ctx, t) - c := tc.(*GrpcClient) // since GetIndexBuildProgress is not exposed +func (s *IndexSuite) TestGetIndexBuildProgress() { + c := s.client + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + collectionName := fmt.Sprintf("coll_%s", randStr(6)) + fieldName := fmt.Sprintf("field_%d", rand.Int31n(10)) + indexName := fmt.Sprintf("index_%s", randStr(4)) + + s.Run("normal_case", func() { + totalRows := rand.Int63n(10000) + indexedRows := rand.Int63n(totalRows) + + defer s.resetMock() + + s.mock.EXPECT().DescribeIndex(mock.Anything, mock.Anything).RunAndReturn(func(ctx context.Context, dir *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { + s.Equal(collectionName, dir.GetCollectionName()) + s.Equal(fieldName, dir.GetFieldName()) + s.Equal(indexName, dir.GetIndexName()) + return &milvuspb.DescribeIndexResponse{ + Status: s.getSuccessStatus(), + IndexDescriptions: []*milvuspb.IndexDescription{ + { + IndexName: indexName, + TotalRows: totalRows, + IndexedRows: indexedRows, + State: commonpb.IndexState_InProgress, + }, + }, + }, nil + }).Once() - t.Run("normal get index build progress", func(t *testing.T) { - var total, built int64 + totalResult, indexedResult, err := c.GetIndexBuildProgress(ctx, collectionName, fieldName, WithIndexName(indexName)) + s.NoError(err) + s.Equal(totalRows, totalResult) + s.Equal(indexedRows, indexedResult) + }) - mockServer.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) { - req, ok := raw.(*milvuspb.GetIndexBuildProgressRequest) - if !ok { - t.FailNow() - } - assert.Equal(t, testCollectionName, req.GetCollectionName()) - resp := &milvuspb.GetIndexBuildProgressResponse{ - TotalRows: total, - IndexedRows: built, - } - s, err := SuccessStatus() - resp.Status = s - return resp, err - }) + s.Run("index_not_found", func() { + defer s.resetMock() + + s.mock.EXPECT().DescribeIndex(mock.Anything, mock.Anything).RunAndReturn(func(ctx context.Context, dir *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { + s.Equal(collectionName, dir.GetCollectionName()) + s.Equal(fieldName, dir.GetFieldName()) + s.Equal(indexName, dir.GetIndexName()) + return &milvuspb.DescribeIndexResponse{ + Status: s.getSuccessStatus(), + IndexDescriptions: []*milvuspb.IndexDescription{}, + }, nil + }).Once() + + _, _, err := c.GetIndexBuildProgress(ctx, collectionName, fieldName, WithIndexName(indexName)) + s.Error(err) + }) - total = rand.Int63n(1000) - built = rand.Int63n(total) - rt, rb, err := c.GetIndexBuildProgress(ctx, testCollectionName, testVectorField) - assert.NoError(t, err) - assert.Equal(t, total, rt) - assert.Equal(t, built, rb) + s.Run("build_failed", func() { + defer s.resetMock() + + s.mock.EXPECT().DescribeIndex(mock.Anything, mock.Anything).RunAndReturn(func(ctx context.Context, dir *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { + s.Equal(collectionName, dir.GetCollectionName()) + s.Equal(fieldName, dir.GetFieldName()) + s.Equal(indexName, dir.GetIndexName()) + return &milvuspb.DescribeIndexResponse{ + Status: s.getSuccessStatus(), + IndexDescriptions: []*milvuspb.IndexDescription{ + { + IndexName: indexName, + State: commonpb.IndexState_Failed, + }, + }, + }, nil + }).Once() + + _, _, err := c.GetIndexBuildProgress(ctx, collectionName, fieldName, WithIndexName(indexName)) + s.Error(err) }) - t.Run("Service return errors", func(t *testing.T) { - defer mockServer.DelInjection(MGetIndexBuildProgress) - mockServer.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) { - _, ok := raw.(*milvuspb.GetIndexBuildProgressRequest) - if !ok { - t.FailNow() - } - resp := &milvuspb.GetIndexBuildProgressResponse{} - return resp, errors.New("mockServer.d error") - }) + s.Run("server_error", func() { + defer s.resetMock() - _, _, err := c.GetIndexBuildProgress(ctx, testCollectionName, testVectorField) - assert.Error(t, err) + s.mock.EXPECT().DescribeIndex(mock.Anything, mock.Anything).RunAndReturn(func(ctx context.Context, dir *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { + s.Equal(collectionName, dir.GetCollectionName()) + s.Equal(fieldName, dir.GetFieldName()) + s.Equal(indexName, dir.GetIndexName()) + return nil, errors.New("mocked") + }).Once() - mockServer.SetInjection(MGetIndexBuildProgress, func(_ context.Context, raw proto.Message) (proto.Message, error) { - _, ok := raw.(*milvuspb.GetIndexBuildProgressRequest) - if !ok { - t.FailNow() - } - resp := &milvuspb.GetIndexBuildProgressResponse{} - resp.Status = &commonpb.Status{ - ErrorCode: commonpb.ErrorCode_UnexpectedError, - } - return resp, nil - }) - _, _, err = c.GetIndexBuildProgress(ctx, testCollectionName, testVectorField) - assert.Error(t, err) + _, _, err := c.GetIndexBuildProgress(ctx, collectionName, fieldName, WithIndexName(indexName)) + s.Error(err) }) +} +func TestIndex(t *testing.T) { + suite.Run(t, new(IndexSuite)) } diff --git a/common/common.go b/common/common.go index 985c34d5..b89fa041 100644 --- a/common/common.go +++ b/common/common.go @@ -2,5 +2,5 @@ package common const ( // SDKVersion const value for current version - SDKVersion = `v2.4.1` + SDKVersion = `v2.4.2` ) diff --git a/test/testcases/ut.log b/test/testcases/ut.log deleted file mode 100644 index 1b71b16f..00000000 --- a/test/testcases/ut.log +++ /dev/null @@ -1,109 +0,0 @@ -2024/08/20 13:05:46 main_test.go:542: parse addr=localhost:19530 -=== RUN TestQueryArrayFieldExpr -2024/08/20 13:05:46 milvus_client.go:14: (ApiRequest): func [NewDefaultGrpcClient], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m59.999895469s]) localhost:19530] -2024/08/20 13:05:46 milvus_client.go:21: (ApiResponse): func [NewDefaultGrpcClient], results: [0xc0001860e0] -2024/08/20 13:05:46 milvus_client.go:14: (ApiRequest): func [CreateCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m59.990038188s]) eYrs 0xc000340d70 2 [0xfca7c0]] -2024/08/20 13:05:46 milvus_client.go:21: (ApiResponse): func [CreateCollection], results: [] -2024/08/20 13:05:47 utils.go:493: expect 100 -2024/08/20 13:05:47 milvus_client.go:14: (ApiRequest): func [InsertRows], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m59.102051463s]) eYrs 3000] -2024/08/20 13:05:49 milvus_client.go:21: (ApiResponse): func [InsertRows], results: [0xc01f6668d0] -2024/08/20 13:05:49 milvus_client.go:14: (ApiRequest): func [Flush], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m56.858153415s]) eYrs false] -2024/08/20 13:05:52 milvus_client.go:21: (ApiResponse): func [Flush], results: [] -2024/08/20 13:05:52 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m54.411170465s]) eYrs floatVec false 0xc00028a9e0 []] -2024/08/20 13:05:56 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:05:56 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m50.194304676s]) eYrs binaryVec false 0xc01f72c0f0 []] -2024/08/20 13:06:00 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:00 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m46.180499627s]) eYrs fp16Vec false 0xc00028a9e0 []] -2024/08/20 13:06:02 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:02 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m44.151899363s]) eYrs bf16Vec false 0xc00028a9e0 []] -2024/08/20 13:06:04 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:04 milvus_client.go:14: (ApiRequest): func [LoadCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m42.227921864s]) eYrs []] -2024/08/20 13:06:05 milvus_client.go:21: (ApiResponse): func [LoadCollection], results: [] -2024/08/20 13:06:05 query_test.go:832: json_contains (int16Array, 100) -2024/08/20 13:06:05 milvus_client.go:14: (ApiRequest): func [Query], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m41.185980494s]) eYrs [] json_contains (int16Array, 100) [count(*)] []] -2024/08/20 13:06:05 milvus_client.go:21: (ApiResponse): func [Query], results: [[0xc01f6fe4b0]] -2024/08/20 13:06:05 query_test.go:835: type:Int64 field_name:"count(*)" scalars: > -2024/08/20 13:06:05 milvus_client.go:14: (ApiRequest): func [ReleaseCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m40.688556826s]) eYrs] -2024/08/20 13:06:06 milvus_client.go:21: (ApiResponse): func [ReleaseCollection], results: [] -2024/08/20 13:06:06 milvus_client.go:14: (ApiRequest): func [DescribeCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m40.45917764s]) eYrs] -2024/08/20 13:06:06 milvus_client.go:21: (ApiResponse): func [DescribeCollection], results: [0xc0002e5500] -2024/08/20 13:06:06 utils.go:1457: Collection eYrs all fileds: [int64 bool int8 int16 int32 float double varchar json floatVec fp16Vec bf16Vec binaryVec boolArray int8Array int16Array int32Array int64Array floatArray doubleArray varcharArray] -2024/08/20 13:06:06 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m40.453045367s]) eYrs boolArray false 0xc01f7e47e0 [0xfca4e0]] -2024/08/20 13:06:09 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:09 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m37.214635597s]) eYrs int8Array false 0xc01f7e47e0 [0xfca4e0]] -2024/08/20 13:06:12 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:12 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m34.187870869s]) eYrs int16Array false 0xc01f7e47e0 [0xfca4e0]] -2024/08/20 13:06:15 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:15 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m31.178102105s]) eYrs int32Array false 0xc01f7e47e0 [0xfca4e0]] -2024/08/20 13:06:18 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:18 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m28.138935868s]) eYrs int64Array false 0xc01f7e47e0 [0xfca4e0]] -2024/08/20 13:06:21 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:21 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m25.208644424s]) eYrs varcharArray false 0xc01f7e47e0 [0xfca4e0]] -2024/08/20 13:06:24 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:24 milvus_client.go:14: (ApiRequest): func [LoadCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m22.184108133s]) eYrs []] -2024/08/20 13:06:24 milvus_client.go:21: (ApiResponse): func [LoadCollection], results: [] -2024/08/20 13:06:24 query_test.go:862: json_contains (int16Array, 100) -2024/08/20 13:06:24 milvus_client.go:14: (ApiRequest): func [Query], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m22.144191242s]) eYrs [] json_contains (int16Array, 100) [count(*)] []] -2024/08/20 13:06:27 milvus_client.go:21: (ApiResponse): func [Query], results: [[0xc01fa488d0]] -2024/08/20 13:06:27 query_test.go:865: type:Int64 field_name:"count(*)" scalars: > -2024/08/20 13:06:27 milvus_client.go:14: (ApiRequest): func [CreateCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m19.121066335s]) BDcb 0xc01fa43450 2 [0xfca7c0]] -2024/08/20 13:06:27 milvus_client.go:21: (ApiResponse): func [CreateCollection], results: [] -2024/08/20 13:06:27 utils.go:493: expect 100 -2024/08/20 13:06:27 milvus_client.go:14: (ApiRequest): func [Insert], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m18.618569037s]) BDcb [0xc01f9c7200 0xc01f9c7230 0xc01f9c7260 0xc01f9c7290 0xc01f9c72c0 0xc01f9c72f0 0xc01f9c7320 0xc01f9c7350 0xc01fafc960 0xc01fafc990 0xc01fafc9c0 0xc01fafc9f0 0xc01fafca20 0xc01fafca50 0xc01fafca80 0xc01fafcab0 0xc01fafcae0 0xc01f8ce000 0xc01f8ce030 0xc01f8ce060 0xc01f8ce090 0xc01f8ce0c0 0xc01f8ce0f0 0xc01f8ce120]] -2024/08/20 13:06:29 milvus_client.go:21: (ApiResponse): func [Insert], results: [0xc01e584210] -2024/08/20 13:06:29 milvus_client.go:14: (ApiRequest): func [Flush], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m16.710567652s]) BDcb false] -2024/08/20 13:06:32 milvus_client.go:21: (ApiResponse): func [Flush], results: [] -2024/08/20 13:06:32 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m13.85886925s]) BDcb floatVec false 0xc0001869e0 []] -2024/08/20 13:06:34 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:34 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m12.164129209s]) BDcb binaryVec false 0xc000121500 []] -2024/08/20 13:06:36 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:36 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m10.176707392s]) BDcb fp16Vec false 0xc0001869e0 []] -2024/08/20 13:06:38 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:38 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m8.167053836s]) BDcb bf16Vec false 0xc0001869e0 []] -2024/08/20 13:06:40 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:40 milvus_client.go:14: (ApiRequest): func [LoadCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m6.172877779s]) BDcb []] -2024/08/20 13:06:42 milvus_client.go:21: (ApiResponse): func [LoadCollection], results: [] -2024/08/20 13:06:42 query_test.go:832: json_contains (int16Array, 100) -2024/08/20 13:06:42 milvus_client.go:14: (ApiRequest): func [Query], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m4.525007934s]) BDcb [] json_contains (int16Array, 100) [count(*)] []] -2024/08/20 13:06:42 milvus_client.go:21: (ApiResponse): func [Query], results: [[0xc01e55a8a0]] -2024/08/20 13:06:42 query_test.go:835: type:Int64 field_name:"count(*)" scalars: > -2024/08/20 13:06:42 milvus_client.go:14: (ApiRequest): func [ReleaseCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m4.300823748s]) BDcb] -2024/08/20 13:06:42 milvus_client.go:21: (ApiResponse): func [ReleaseCollection], results: [] -2024/08/20 13:06:42 milvus_client.go:14: (ApiRequest): func [DescribeCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m3.890065997s]) BDcb] -2024/08/20 13:06:42 milvus_client.go:21: (ApiResponse): func [DescribeCollection], results: [0xc0003050a0] -2024/08/20 13:06:42 utils.go:1457: Collection BDcb all fileds: [int64 bool int8 int16 int32 float double varchar json floatVec fp16Vec bf16Vec binaryVec boolArray int8Array int16Array int32Array int64Array floatArray doubleArray varcharArray] -2024/08/20 13:06:42 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m3.888356072s]) BDcb boolArray false 0xc01e446260 [0xfca4e0]] -2024/08/20 13:06:46 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:46 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [1m0.158887447s]) BDcb int8Array false 0xc01e446260 [0xfca4e0]] -2024/08/20 13:06:49 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:49 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [57.23042059s]) BDcb int16Array false 0xc01e446260 [0xfca4e0]] -2024/08/20 13:06:52 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:52 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [54.193458112s]) BDcb int32Array false 0xc01e446260 [0xfca4e0]] -2024/08/20 13:06:55 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:55 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [51.170879117s]) BDcb int64Array false 0xc01e446260 [0xfca4e0]] -2024/08/20 13:06:58 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:06:58 milvus_client.go:14: (ApiRequest): func [CreateIndex], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [48.145540585s]) BDcb varcharArray false 0xc01e446260 [0xfca4e0]] -2024/08/20 13:07:01 milvus_client.go:21: (ApiResponse): func [CreateIndex], results: [] -2024/08/20 13:07:01 milvus_client.go:14: (ApiRequest): func [LoadCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [45.218971559s]) BDcb []] -2024/08/20 13:07:01 milvus_client.go:21: (ApiResponse): func [LoadCollection], results: [] -2024/08/20 13:07:01 query_test.go:862: json_contains (int16Array, 100) -2024/08/20 13:07:01 milvus_client.go:14: (ApiRequest): func [Query], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [45.180351592s]) BDcb [] json_contains (int16Array, 100) [count(*)] []] -2024/08/20 13:07:02 milvus_client.go:21: (ApiResponse): func [Query], results: [[0xc01f325ef0]] -2024/08/20 13:07:02 query_test.go:865: type:Int64 field_name:"count(*)" scalars: > -2024/08/20 13:07:02 milvus_client.go:14: (ApiRequest): func [DropCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [43.764403217s]) BDcb] -2024/08/20 13:07:02 milvus_client.go:21: (ApiResponse): func [DropCollection], results: [] -2024/08/20 13:07:02 milvus_client.go:14: (ApiRequest): func [DropCollection], args: [context.Background.WithDeadline(2024-08-20 13:07:46.537079296 +0800 CST m=+120.024016181 [43.727240371s]) eYrs] -2024/08/20 13:07:02 milvus_client.go:21: (ApiResponse): func [DropCollection], results: [] -2024/08/20 13:07:02 milvus_client.go:14: (ApiRequest): func [Close], args: [] -2024/08/20 13:07:02 milvus_client.go:21: (ApiResponse): func [Close], results: [] ---- PASS: TestQueryArrayFieldExpr (76.28s) -PASS -coverage: 0.0% of statements -2024/08/20 13:07:02 main_test.go:29: Start to tear down all -2024/08/20 13:07:02 milvus_client.go:14: (ApiRequest): func [NewDefaultGrpcClient], args: [context.Background.WithDeadline(2024-08-20 13:09:02.822676352 +0800 CST m=+196.309613251 [1m59.999947033s]) localhost:19530] -2024/08/20 13:07:02 milvus_client.go:21: (ApiResponse): func [NewDefaultGrpcClient], results: [0xc01f2f8240] -2024/08/20 13:07:02 milvus_client.go:14: (ApiRequest): func [ListDatabases], args: [context.Background.WithDeadline(2024-08-20 13:09:02.822676352 +0800 CST m=+196.309613251 [1m59.996060858s])] -2024/08/20 13:07:02 milvus_client.go:21: (ApiResponse): func [ListDatabases], results: [[{default []}]] -2024/08/20 13:07:02 milvus_client.go:14: (ApiRequest): func [Close], args: [] -2024/08/20 13:07:02 milvus_client.go:21: (ApiResponse): func [Close], results: [] -ok github.com/milvus-io/milvus-sdk-go/v2/test/testcases 77.458s