-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQE: add support for group_left
and group_right
(aka many-to-one and one-to-many matching)
#10119
base: main
Are you sure you want to change the base?
Conversation
"github.com/grafana/mimir/pkg/streamingpromql/types" | ||
) | ||
|
||
var errMultipleMatchesOnManySide = errors.New("multiple matches for labels: grouping labels must ensure unique matches") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewers: this error message isn't the best, but it's what Prometheus uses, and including more specific details is difficult.
4f7e673
to
74afbb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. I admit for some of the review I'm trusting the general approach, unit tests, and benchmarks, but it overall seems good sans a few comments.
pkg/streamingpromql/operators/binops/grouped_vector_vector_binary_operation.go
Outdated
Show resolved
Hide resolved
pkg/streamingpromql/operators/binops/grouped_vector_vector_binary_operation.go
Outdated
Show resolved
Hide resolved
pkg/streamingpromql/operators/binops/grouped_vector_vector_binary_operation.go
Show resolved
Hide resolved
Forgot to add that I think we should see group left/right in the mixed metrics test gauntlet |
Added in 7214a8e. |
# Conflicts: # cmd/mimir/config-descriptor.json # cmd/mimir/help-all.txt.tmpl # docs/sources/mimir/configure/configuration-parameters/index.md # pkg/streamingpromql/config.go # pkg/streamingpromql/engine_test.go
b72c6f1
to
b58c518
Compare
…same timestamp on the same "one" side for the same group with different additional labels
… BytesWithoutLabels() are reused if resized
…omputeResult` to reduce nesting
b58c518
to
d2e2a1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for addressing the comments!
What this PR does
This PR adds support for
group_left
andgroup_right
(aka many-to-one and one-to-many matching) in binary operations to MQE.In our benchmarks, latency is up to 80% lower and peak memory utilisation is up to 30% lower with MQE compared to Prometheus' engine:
I am not adding a changelog entry given it is covered by the generic MQE changelog entry that links to #10067.
Which issue(s) this PR fixes or relates to
#10067
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.