diff --git a/configs/milvus.yaml b/configs/milvus.yaml index c70eb81407..4912845682 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -159,6 +159,7 @@ rootCoord: # Related configuration of proxy, used to validate client requests and reduce the returned results. proxy: timeTickInterval: 200 # ms, the interval that proxy synchronize the time tick + healthCheckTimetout: 500 # ms, the interval that to do component healthy check msgStream: timeTick: bufSize: 512 diff --git a/internal/proxy/look_aside_balancer.go b/internal/proxy/look_aside_balancer.go index 3ba66be4e1..7351c46320 100644 --- a/internal/proxy/look_aside_balancer.go +++ b/internal/proxy/look_aside_balancer.go @@ -171,7 +171,8 @@ func (b *LookAsideBalancer) checkQueryNodeHealthLoop(ctx context.Context) { b.metricsUpdateTs.Range(func(node int64, lastUpdateTs int64) bool { if now-lastUpdateTs > checkQueryNodeHealthInterval.Milliseconds() { futures = append(futures, pool.Submit(func() (any, error) { - ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) + checkInterval := paramtable.Get().ProxyCfg.HealthCheckTimetout.GetAsDuration(time.Millisecond) + ctx, cancel := context.WithTimeout(context.Background(), checkInterval) defer cancel() checkHealthFailed := func(err error) bool { diff --git a/pkg/util/paramtable/component_param.go b/pkg/util/paramtable/component_param.go index 665f220f48..fd4521698b 100644 --- a/pkg/util/paramtable/component_param.go +++ b/pkg/util/paramtable/component_param.go @@ -880,6 +880,7 @@ type proxyConfig struct { SoPath ParamItem `refreshable:"false"` TimeTickInterval ParamItem `refreshable:"false"` + HealthCheckTimetout ParamItem `refreshable:"true"` MsgStreamTimeTickBufSize ParamItem `refreshable:"true"` MaxNameLength ParamItem `refreshable:"true"` MaxUsernameLength ParamItem `refreshable:"true"` @@ -908,6 +909,16 @@ func (p *proxyConfig) init(base *BaseTable) { } p.TimeTickInterval.Init(base.mgr) + p.HealthCheckTimetout = ParamItem{ + Key: "proxy.healthCheckTimetout", + Version: "2.3.0", + DefaultValue: "500", + PanicIfEmpty: true, + Doc: "ms, the interval that to do component healthy check", + Export: true, + } + p.HealthCheckTimetout.Init(base.mgr) + p.MsgStreamTimeTickBufSize = ParamItem{ Key: "proxy.msgStream.timeTick.bufSize", Version: "2.2.0", diff --git a/pkg/util/paramtable/component_param_test.go b/pkg/util/paramtable/component_param_test.go index e2f5bb387d..9229ac7b1a 100644 --- a/pkg/util/paramtable/component_param_test.go +++ b/pkg/util/paramtable/component_param_test.go @@ -154,6 +154,8 @@ func TestComponentParam(t *testing.T) { t.Logf("TimeTickInterval: %v", Params.TimeTickInterval) + t.Logf("healthCheckTimetout: %v", Params.HealthCheckTimetout) + t.Logf("MsgStreamTimeTickBufSize: %d", Params.MsgStreamTimeTickBufSize.GetAsInt64()) t.Logf("MaxNameLength: %d", Params.MaxNameLength.GetAsInt64())