From b70d2b2ced5ea6826b9af02c4dcd7142d8bb2451 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Thu, 17 Oct 2024 10:49:13 +0800 Subject: [PATCH 1/2] enhance: Set default max send recv size Related to #831 Signed-off-by: Congqi Xia --- client/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/config.go b/client/config.go index 49c178063..df9d4af90 100644 --- a/client/config.go +++ b/client/config.go @@ -46,6 +46,10 @@ var DefaultGrpcOpts = []grpc.DialOption{ }, MinConnectTimeout: 3 * time.Second, }), + grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32), // math.MaxInt32 = 2147483647, 2GB - 1 + // not setting max send msg size, since default is Unlimited + ), } // Config for milvus client. From 0809c85e3a17c30a97e4c16e7724eb638358b5d6 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Tue, 22 Oct 2024 10:57:54 +0800 Subject: [PATCH 2/2] Fix groupby search unsupported index Signed-off-by: Congqi Xia --- test/testcases/groupby_search_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/testcases/groupby_search_test.go b/test/testcases/groupby_search_test.go index 8bc1285d7..2cbcfbecc 100644 --- a/test/testcases/groupby_search_test.go +++ b/test/testcases/groupby_search_test.go @@ -51,11 +51,9 @@ func genGroupByBinaryIndex(metricType entity.MetricType) []entity.Index { func genUnsupportedFloatGroupByIndex() []entity.Index { idxIvfPq, _ := entity.NewIndexIvfPQ(entity.L2, 128, 16, 8) idxScann, _ := entity.NewIndexSCANN(entity.L2, 16, false) - idxDiskAnn, _ := entity.NewIndexDISKANN(entity.L2) return []entity.Index{ idxIvfPq, idxScann, - idxDiskAnn, } } @@ -438,14 +436,16 @@ func TestSearchGroupByPagination(t *testing.T) { func TestSearchGroupByUnsupportedIndex(t *testing.T) { t.Parallel() for _, idx := range genUnsupportedFloatGroupByIndex() { - mc, ctx, collName := prepareDataForGroupBySearch(t, 3, 1000, idx, false) - // groupBy search - queryVec := common.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector) - sp, _ := entity.NewIndexIvfFlatSearchParam(32) - _, err := mc.Search(ctx, collName, []string{}, "", []string{common.DefaultIntFieldName, common.DefaultVarcharFieldName}, - queryVec, common.DefaultFloatVecFieldName, entity.MetricType(idx.Params()["metrics_type"]), - common.DefaultTopK, sp, client.WithGroupByField(common.DefaultVarcharFieldName)) - common.CheckErr(t, err, false, "doesn't support search_group_by") + t.Run(string(idx.IndexType()), func(t *testing.T) { + mc, ctx, collName := prepareDataForGroupBySearch(t, 3, 1000, idx, false) + // groupBy search + queryVec := common.GenSearchVectors(common.DefaultNq, common.DefaultDim, entity.FieldTypeFloatVector) + sp, _ := entity.NewIndexIvfFlatSearchParam(32) + _, err := mc.Search(ctx, collName, []string{}, "", []string{common.DefaultIntFieldName, common.DefaultVarcharFieldName}, + queryVec, common.DefaultFloatVecFieldName, entity.MetricType(idx.Params()["metrics_type"]), + common.DefaultTopK, sp, client.WithGroupByField(common.DefaultVarcharFieldName)) + common.CheckErr(t, err, false, "doesn't support search_group_by") + }) } }