diff --git a/pkg/util/paramtable/component_param.go b/pkg/util/paramtable/component_param.go index d41dc2b755..d8ca18a9d3 100644 --- a/pkg/util/paramtable/component_param.go +++ b/pkg/util/paramtable/component_param.go @@ -1111,18 +1111,16 @@ So adjust at your risk!`, Key: "proxy.maxVectorFieldNum", Version: "2.4.0", DefaultValue: "4", - Formatter: func(v string) string { - if getAsInt(v) > 10 { - return "10" - } - return v - }, PanicIfEmpty: true, Doc: "Maximum number of vector fields in a collection.", Export: true, } p.MaxVectorFieldNum.Init(base.mgr) + if p.MaxVectorFieldNum.GetAsInt() > 10 || p.MaxVectorFieldNum.GetAsInt() <= 0 { + panic(fmt.Sprintf("Maximum number of vector fields in a collection should be in (0, 10], not %d", p.MaxVectorFieldNum.GetAsInt())) + } + p.MaxShardNum = ParamItem{ Key: "proxy.maxShardNum", DefaultValue: "16",