From cce496da92bf5c452f105c333039ca7cb12b57b6 Mon Sep 17 00:00:00 2001 From: Wilfried ROSET Date: Thu, 29 Feb 2024 15:49:26 +0100 Subject: [PATCH] Querier: deprecates max-query-into-future (#7496) `max-query-into-future` has been inherited from Cortex when it was running on chunks storage. Its purposes was to avoid errors when data was missing. Since Mimir does not rely on chunks storage anymore, there is no errors nor performance penalty. As such, we can deprecate the setting. Signed-off-by: Wilfried Roset --- CHANGELOG.md | 1 + cmd/mimir/config-descriptor.json | 2 +- cmd/mimir/help-all.txt.tmpl | 2 +- .../mimir/configure/configuration-parameters/index.md | 2 +- pkg/querier/querier.go | 5 +++-- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d5e2a4199..9a18947d80b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ * [CHANGE] Distributor: Change`-distributor.enable-otlp-metadata-storage` flag's default to true, and deprecate it. The flag will be removed in Mimir 2.14. #7366 * [CHANGE] Store-gateway: Use a shorter TTL for cached items related to temporary blocks. #7407 * [CHANGE] Standardise exemplar label as "trace_id". #7475 +* [CHANGE] The configuration option `-querier.max-query-into-future` has been deprecated and will be removed in Mimir 2.14. #7496 * [FEATURE] Introduce `-server.log-source-ips-full` option to log all IPs from `Forwarded`, `X-Real-IP`, `X-Forwarded-For` headers. #7250 * [FEATURE] Introduce `-tenant-federation.max-tenants` option to limit the max number of tenants allowed for requests when federation is enabled. #6959 * [FEATURE] Cardinality API: added a new `count_method` parameter which enables counting active label values. #7085 diff --git a/cmd/mimir/config-descriptor.json b/cmd/mimir/config-descriptor.json index 46c1b25a2bf..56a8567fb29 100644 --- a/cmd/mimir/config-descriptor.json +++ b/cmd/mimir/config-descriptor.json @@ -1699,7 +1699,7 @@ "fieldDefaultValue": 600000000000, "fieldFlag": "querier.max-query-into-future", "fieldType": "duration", - "fieldCategory": "advanced" + "fieldCategory": "deprecated" }, { "kind": "block", diff --git a/cmd/mimir/help-all.txt.tmpl b/cmd/mimir/help-all.txt.tmpl index 7562ff10432..94ad812cb3d 100644 --- a/cmd/mimir/help-all.txt.tmpl +++ b/cmd/mimir/help-all.txt.tmpl @@ -1712,7 +1712,7 @@ Usage of ./cmd/mimir/mimir: -querier.max-partial-query-length duration Limit the time range for partial queries at the querier level. -querier.max-query-into-future duration - Maximum duration into the future you can query. 0 to disable. (default 10m0s) + [deprecated] Maximum duration into the future you can query. 0 to disable. (default 10m0s) -querier.max-query-lookback duration Limit how long back data (series and metadata) can be queried, up until duration ago. This limit is enforced in the query-frontend, querier and ruler. If the requested time range is outside the allowed range, the request will not fail but will be manipulated to only query data within the allowed time range. 0 to disable. -querier.max-query-parallelism int diff --git a/docs/sources/mimir/configure/configuration-parameters/index.md b/docs/sources/mimir/configure/configuration-parameters/index.md index f4634e73a0c..a4d8dd743e5 100644 --- a/docs/sources/mimir/configure/configuration-parameters/index.md +++ b/docs/sources/mimir/configure/configuration-parameters/index.md @@ -1212,7 +1212,7 @@ The `querier` block configures the querier. # CLI flag: -querier.query-store-after [query_store_after: | default = 12h] -# (advanced) Maximum duration into the future you can query. 0 to disable. +# (deprecated) Maximum duration into the future you can query. 0 to disable. # CLI flag: -querier.max-query-into-future [max_query_into_future: | default = 10m] diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index c7899b48cfe..e7303aede75 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -40,8 +40,9 @@ import ( // Config contains the configuration require to create a querier type Config struct { // QueryStoreAfter the time after which queries should also be sent to the store and not just ingesters. - QueryStoreAfter time.Duration `yaml:"query_store_after" category:"advanced"` - MaxQueryIntoFuture time.Duration `yaml:"max_query_into_future" category:"advanced"` + QueryStoreAfter time.Duration `yaml:"query_store_after" category:"advanced"` + // Deprecated in Mimir 2.12, remove in Mimir 2.14 + MaxQueryIntoFuture time.Duration `yaml:"max_query_into_future" category:"deprecated"` StoreGatewayClient ClientConfig `yaml:"store_gateway_client"`