From a71b0fc1478a511a0c225748b5d1d4e6233af448 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Fri, 9 Jun 2023 12:10:33 +0200 Subject: [PATCH] Nits after a self code review Signed-off-by: Marco Pracucci --- cmd/mimir/config-descriptor.json | 2 +- cmd/mimir/help-all.txt.tmpl | 2 +- .../mimir/references/configuration-parameters/index.md | 2 +- operations/helm/charts/mimir-distributed/README.md | 2 +- pkg/cardinality/request.go | 8 ++++---- pkg/util/validation/limits.go | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/mimir/config-descriptor.json b/cmd/mimir/config-descriptor.json index 3329667ff26..d53854f749a 100644 --- a/cmd/mimir/config-descriptor.json +++ b/cmd/mimir/config-descriptor.json @@ -3163,7 +3163,7 @@ "kind": "field", "name": "results_cache_ttl_for_cardinality_query", "required": false, - "desc": "Time to live duration for cached cardinality query results. The value 0 disabled the cache.", + "desc": "Time to live duration for cached cardinality query results. The value 0 disables the cache.", "fieldValue": null, "fieldDefaultValue": 0, "fieldFlag": "query-frontend.results-cache-ttl-for-cardinality-query", diff --git a/cmd/mimir/help-all.txt.tmpl b/cmd/mimir/help-all.txt.tmpl index c69be57e2a4..09357cadb0f 100644 --- a/cmd/mimir/help-all.txt.tmpl +++ b/cmd/mimir/help-all.txt.tmpl @@ -1712,7 +1712,7 @@ Usage of ./cmd/mimir/mimir: -query-frontend.results-cache-ttl duration [experimental] Time to live duration for cached query results. If query falls into out-of-order time window, -query-frontend.results-cache-ttl-for-out-of-order-time-window is used instead. (default 1w) -query-frontend.results-cache-ttl-for-cardinality-query duration - [experimental] Time to live duration for cached cardinality query results. The value 0 disabled the cache. + [experimental] Time to live duration for cached cardinality query results. The value 0 disables the cache. -query-frontend.results-cache-ttl-for-out-of-order-time-window duration [experimental] Time to live duration for cached query results if query falls into out-of-order time window. This is lower than -query-frontend.results-cache-ttl so that incoming out-of-order samples are returned in the query results sooner. (default 10m) -query-frontend.results-cache.backend string diff --git a/docs/sources/mimir/references/configuration-parameters/index.md b/docs/sources/mimir/references/configuration-parameters/index.md index ff399a6776b..734fc8ba53b 100644 --- a/docs/sources/mimir/references/configuration-parameters/index.md +++ b/docs/sources/mimir/references/configuration-parameters/index.md @@ -2857,7 +2857,7 @@ The `limits` block configures default and per-tenant limits imposed by component [results_cache_ttl_for_out_of_order_time_window: | default = 10m] # (experimental) Time to live duration for cached cardinality query results. The -# value 0 disabled the cache. +# value 0 disables the cache. # CLI flag: -query-frontend.results-cache-ttl-for-cardinality-query [results_cache_ttl_for_cardinality_query: | default = 0s] diff --git a/operations/helm/charts/mimir-distributed/README.md b/operations/helm/charts/mimir-distributed/README.md index 686e4ab6e2a..c2156cbe4ee 100644 --- a/operations/helm/charts/mimir-distributed/README.md +++ b/operations/helm/charts/mimir-distributed/README.md @@ -4,7 +4,7 @@ Helm chart for deploying [Grafana Mimir](https://grafana.com/docs/mimir/latest/) For the full documentation, visit [Grafana mimir-distributed Helm chart documentation](https://grafana.com/docs/helm-charts/mimir-distributed/latest/). -> **Note:** The documentation version is derived from the Helm chart version which is 4.5.0-weekly.240. +> **Note:** The documentation version is derived from the Helm chart version which is 4.5.0-weekly.241. When upgrading from Helm chart version 3.x, please see [Migrate from single zone to zone-aware replication with Helm](https://grafana.com/docs/helm-charts/mimir-distributed/latest/migration-guides/migrate-from-single-zone-with-helm/). When upgrading from Helm chart version 2.1, please see [Upgrade the Grafana Mimir Helm chart from version 2.1 to 3.0](https://grafana.com/docs/helm-charts/mimir-distributed/latest/migration-guides/migrate-helm-chart-2.1-to-3.0/) as well. diff --git a/pkg/cardinality/request.go b/pkg/cardinality/request.go index 70dbd814f59..025b2345af1 100644 --- a/pkg/cardinality/request.go +++ b/pkg/cardinality/request.go @@ -34,7 +34,7 @@ type LabelNamesRequest struct { Limit int } -// Strings returns a full representation of the request. This returned string can be +// Strings returns a full representation of the request. The returned string can be // used to uniquely identify the request. func (r *LabelNamesRequest) String() string { b := strings.Builder{} @@ -59,7 +59,7 @@ func (r *LabelNamesRequest) RequestType() RequestType { } // DecodeLabelNamesRequest decodes the input http.Request into a LabelNamesRequest. -// The input http.Request can either be a GET or POST. +// The input http.Request can either be a GET or POST with URL-encoded parameters. func DecodeLabelNamesRequest(r *http.Request) (*LabelNamesRequest, error) { var ( parsed = &LabelNamesRequest{} @@ -90,7 +90,7 @@ type LabelValuesRequest struct { Limit int } -// Strings returns a full representation of the request. This returned string can be +// Strings returns a full representation of the request. The returned string can be // used to uniquely identify the request. func (r *LabelValuesRequest) String() string { b := strings.Builder{} @@ -124,7 +124,7 @@ func (r *LabelValuesRequest) RequestType() RequestType { } // DecodeLabelValuesRequest decodes the input http.Request into a LabelValuesRequest. -// The input http.Request can either be a GET or POST. +// The input http.Request can either be a GET or POST with URL-encoded parameters. func DecodeLabelValuesRequest(r *http.Request) (*LabelValuesRequest, error) { var ( parsed = &LabelValuesRequest{} diff --git a/pkg/util/validation/limits.go b/pkg/util/validation/limits.go index 85f04b42aa5..7f942e6aa02 100644 --- a/pkg/util/validation/limits.go +++ b/pkg/util/validation/limits.go @@ -260,7 +260,7 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { f.Var(&l.ResultsCacheTTL, resultsCacheTTLFlag, fmt.Sprintf("Time to live duration for cached query results. If query falls into out-of-order time window, -%s is used instead.", resultsCacheTTLForOutOfOrderWindowFlag)) _ = l.ResultsCacheTTLForOutOfOrderTimeWindow.Set("10m") f.Var(&l.ResultsCacheTTLForOutOfOrderTimeWindow, resultsCacheTTLForOutOfOrderWindowFlag, fmt.Sprintf("Time to live duration for cached query results if query falls into out-of-order time window. This is lower than -%s so that incoming out-of-order samples are returned in the query results sooner.", resultsCacheTTLFlag)) - f.Var(&l.ResultsCacheTTLForCardinalityQuery, "query-frontend.results-cache-ttl-for-cardinality-query", "Time to live duration for cached cardinality query results. The value 0 disabled the cache.") + f.Var(&l.ResultsCacheTTLForCardinalityQuery, "query-frontend.results-cache-ttl-for-cardinality-query", "Time to live duration for cached cardinality query results. The value 0 disables the cache.") f.IntVar(&l.MaxQueryExpressionSizeBytes, maxQueryExpressionSizeBytesFlag, 0, "Max size of the raw query, in bytes. 0 to not apply a limit to the size of the query.") // Store-gateway.