From 81cbb9f7a73c755c97cfedcd068619c1c6b2734f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E8=BF=AA?= Date: Thu, 17 Feb 2022 17:01:15 +0800 Subject: [PATCH 1/2] Fix two remote_timeout configs in ingester_client block --- docs/sources/configuration/_index.md | 5 +++-- pkg/distributor/clientpool/ingester_client_pool.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/sources/configuration/_index.md b/docs/sources/configuration/_index.md index be9443b514b03..20b08e634753c 100644 --- a/docs/sources/configuration/_index.md +++ b/docs/sources/configuration/_index.md @@ -1006,10 +1006,11 @@ pool_config: # How quickly a dead client will be removed after it has been detected # to disappear. Set this to a value to allow time for a secondary # health check to recover the missing client. - [remotetimeout: ] + # CLI flag: -ingester.client.healthcheck-timeout + [remote_timeout: ] # The remote request timeout on the client side. -# CLI flag: -ingester.client.healthcheck-timeout +# CLI flag: -ingester.client.timeout [remote_timeout: | default = 5s] # Configures how the gRPC connection to ingesters work as a client diff --git a/pkg/distributor/clientpool/ingester_client_pool.go b/pkg/distributor/clientpool/ingester_client_pool.go index 439fbf52882d2..9058b1b4c5ccf 100644 --- a/pkg/distributor/clientpool/ingester_client_pool.go +++ b/pkg/distributor/clientpool/ingester_client_pool.go @@ -21,7 +21,7 @@ var clients = promauto.NewGauge(prometheus.GaugeOpts{ type PoolConfig struct { ClientCleanupPeriod time.Duration `yaml:"client_cleanup_period"` HealthCheckIngesters bool `yaml:"health_check_ingesters"` - RemoteTimeout time.Duration `yaml:"-"` + RemoteTimeout time.Duration `yaml:"remote_timeout"` } // RegisterFlags adds the flags required to config this to the given FlagSet. From 3c8e5841167b027ff64bda22d88bd69488935767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E8=BF=AA?= Date: Tue, 22 Feb 2022 11:45:45 +0800 Subject: [PATCH 2/2] Add default value of remote_timeout in document --- docs/sources/configuration/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/configuration/_index.md b/docs/sources/configuration/_index.md index 20b08e634753c..e00e26f26fa61 100644 --- a/docs/sources/configuration/_index.md +++ b/docs/sources/configuration/_index.md @@ -1007,7 +1007,7 @@ pool_config: # to disappear. Set this to a value to allow time for a secondary # health check to recover the missing client. # CLI flag: -ingester.client.healthcheck-timeout - [remote_timeout: ] + [remote_timeout: | default = 1s] # The remote request timeout on the client side. # CLI flag: -ingester.client.timeout