mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Enlarge timeout to prevent health check failure (#25173)
Signed-off-by: lixinguo <xinguo.li@zilliz.com> Co-authored-by: lixinguo <xinguo.li@zilliz.com>
This commit is contained in:
parent
b3594e8fdd
commit
b30517d303
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user