Skip to content

Commit

Permalink
Nits after a self code review
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Pracucci <marco@pracucci.com>
  • Loading branch information
pracucci committed Jun 9, 2023
1 parent be08a81 commit a71b0fc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: <duration> | 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: <duration> | default = 0s]

Expand Down
2 changes: 1 addition & 1 deletion operations/helm/charts/mimir-distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions pkg/cardinality/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand All @@ -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{}
Expand Down Expand Up @@ -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{}
Expand Down Expand Up @@ -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{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/validation/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a71b0fc

Please sign in to comment.