From 03c0d9a6726ba79b3e266bcd415abcdd3b22b471 Mon Sep 17 00:00:00 2001 From: Zakhar Bessarab Date: Fri, 10 Jan 2025 12:57:58 +0400 Subject: [PATCH] app/vmselect/promql: set tenant information for numbers Since https://github.com/VictoriaMetrics/VictoriaMetrics/commit/44b071296d4bb98a5d425d0350636b4dfdc3c4b9 `evalNumber` function no longer updating MetricName tenancy information. This leads to mismatch in metric names between the query result and evaluated number for all tenants other than 0:0. For example, query `count(up) or 0` will return different results for tenants 0:0 and 1:1 (assuming up is present for both tenants): - tenant 0:0 - will only contain result of `count(up)` - tenant 1:1 - will return both `count(up)` and `0` since metric names will not be matched This restores setting of tenancy information for metric name for single-tenant queries. Related issue: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7987 --- Signed-off-by: Zakhar Bessarab --- docs/changelog/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index a132ff2d8..07b59fc8d 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -37,6 +37,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [vminsert](https://docs.victoriametrics.com/vminsert/): storage nodes defined in `-storageNode` are now sorted, ensuring that varying node orders across different vminsert instances do not result in inconsistent replication. * BUGFIX: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/) and `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): properly ingest `influx` line protocol metrics with empty tags. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7933) for details. * BUGFIX: [vmselect](https://docs.victoriametrics.com/cluster-victoriametrics/): allow to override the default unique time series limit in vmstorage with command-line flags like `-search.maxUniqueTimeseries`, `-search.maxLabelsAPISeries`. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7852). +* BUGFIX: [vmselect](https://docs.victoriametrics.com/cluster-victoriametrics/): properly set tenancy information when evaluating numbers in a query. Previously, the tenancy information could lead to mismatch between query result and a number. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7987) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert/): fix marshaling of request body for Alertmanager notification. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7985) for the details. ## [v1.108.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.108.1)