Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: [2.4] Set default max send recv size #834

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 10 additions & 10 deletions test/testcases/groupby_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down Expand Up @@ -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")
})
}
}

Expand Down
Loading