diff --git a/CHANGELOG.md b/CHANGELOG.md index 964a3fd328..da7a7384cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re ### Changed - [#6168](https://github.com/thanos-io/thanos/pull/6168) Receiver: Make ketama hashring fail early when configured with number of nodes lower than the replication factor. - [#6201](https://github.com/thanos-io/thanos/pull/6201) Query-Frontend: Disable absent and absent_over_time for vertical sharding. +- [#6212](https://github.com/thanos-io/thanos/pull/6212) Query-Frontend: Disable scalar for vertical sharding. ### Removed diff --git a/pkg/querysharding/analyzer.go b/pkg/querysharding/analyzer.go index 37a0d30296..12cb1b9a1a 100644 --- a/pkg/querysharding/analyzer.go +++ b/pkg/querysharding/analyzer.go @@ -105,7 +105,7 @@ func (a *QueryAnalyzer) Analyze(query string) (QueryAnalysis, error) { if n.Func.Name == "label_join" || n.Func.Name == "label_replace" { dstLabel := stringFromArg(n.Args[1]) dynamicLabels = append(dynamicLabels, dstLabel) - } else if n.Func.Name == "absent_over_time" || n.Func.Name == "absent" { + } else if n.Func.Name == "absent_over_time" || n.Func.Name == "absent" || n.Func.Name == "scalar" { isShardable = false return notShardableErr } diff --git a/pkg/querysharding/analyzer_test.go b/pkg/querysharding/analyzer_test.go index 6faa6e839f..b86721706c 100644 --- a/pkg/querysharding/analyzer_test.go +++ b/pkg/querysharding/analyzer_test.go @@ -75,6 +75,10 @@ http_requests_total`, name: "absent is not shardable", expression: `sum by (url) (absent(http_requests_total{code="400"}))`, }, + { + name: "scalar is not shardable", + expression: `scalar(sum by (url) (http_requests_total{code="400"}))`, + }, } shardableByLabels := []testCase{