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:
smellthemoon 2023-06-29 17:10:23 +08:00 committed by GitHub
parent b3594e8fdd
commit b30517d303
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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",

View File

@ -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())