You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MQE: rename statsTracker to subsetStats, introduce support for serializing OperatorEvaluationStats (#15045)
#### What this PR does
This PR makes two changes to MQE's support for tracking query
statistics:
* it renames `statsTracker` to `subsetStats`, which better conveys its
purpose
* it introduces support for serializing `OperatorEvaluationStats` to /
from Protobuf, which is a prerequisite for supporting query stats with
remote execution and range vector splitting
#### Which issue(s) this PR fixes or relates to
(none)
#### Checklist
- [x] Tests updated.
- [n/a] Documentation added.
- [x] `CHANGELOG.md` updated - the order of entries should be
`[CHANGE]`, `[FEATURE]`, `[ENHANCEMENT]`, `[BUGFIX]`. If changelog entry
is not needed, please add the `changelog-not-needed` label to the PR.
- [n/a]
[`about-versioning.md`](https://github.com/grafana/mimir/blob/main/docs/sources/mimir/configure/about-versioning.md)
updated with experimental features.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Adds a new protobuf-serialized representation for
`OperatorEvaluationStats` and changes how per-subset stats are
allocated/decoded, which could affect query stats correctness and memory
accounting in MQE paths.
>
> **Overview**
> Adds protobuf serialization support for MQE operator evaluation stats
by introducing `EncodedOperatorEvaluationStats`/`EncodedSubsetStats`
(new `stats.proto` + generated `stats.pb.go`) and
`OperatorEvaluationStats.Encode()` / `Decode()` methods.
>
> Refactors internal tracking by renaming `statsTracker` to
`subsetStats`, avoiding subset slice allocation when `subsetCount==0`,
and adds tests covering round-trip encoding/decoding plus validation
errors and memory-consumption tracking. Updates the changelog entry to
include the additional PR reference.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
55be141. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@
59
59
* [FEATURE] Ingest storage: Add `-ingest-storage.kafka.tls*` flags to connect to Kafka using TLS. #14550
60
60
* [FEATURE] Ingest storage: Add `-ingest-storage.ingestion-partition-tenant-write-shard-size` to limit the number of partitions used for writes independently from reads, allowing safely reducing the shard size without losing query coverage during the migration. #14780
61
61
* [FEATURE] MQE: Add experimental support for splitting and caching intermediate results for functions over range vectors in instant queries. #13472 #14479 #14506 #14499 #14517 #14536 #14614 #14645 #14677 #14788
62
-
* [FEATURE] MQE: Add experimental support for reporting the number of samples read per query. #14828 #14839 #14952
62
+
* [FEATURE] MQE: Add experimental support for reporting the number of samples read per query. #14828 #14839 #14952 #15045
63
63
* [FEATURE] Compactor: Add `-compactor.ooo-split-and-merge-shards` per-tenant limit to allow a separate shard count for blocks with the out-of-order external label. #14704
64
64
* [FEATURE] Distributor: add experimental support for controlling OTLP metric name suffix addition and translation strategy via `X-Mimir-OTLP-AddSuffixes` and `X-Mimir-OTLP-TranslationStrategy` request headers on the OTLP push path, gated by `-api.otlp-translation-headers-enabled` (off by default). #14782
65
65
* [ENHANCEMENT] Distributor: Add per-tenant `-distributor.active-series-limit-response-code` override to configure the HTTP response code returned when rejecting series due to the active series limit. Defaults to 429 (Too Many Requests). Set to 400 (Bad Request) to prevent clients from retrying rejected requests. #14981
returnnil, fmt.Errorf("number of samples processed steps in encoded form (%d) does not match expected (%d)", len(e.SamplesProcessedPerStep), timeRange.StepCount)
returnnil, fmt.Errorf("number of new samples read steps in encoded form (%d) does not match expected (%d)", len(e.NewSamplesReadPerStep), timeRange.StepCount)
0 commit comments