prometheus/model
Patrick Oyarzun 84841a4c4e
Fix regexp set matches for literal matchers
I was surprised to find out that posting lookups for `foo=~"(bar|bar)"`
are faster than `foo=~"bar"`. It turns out we introduced a performance
regression in https://github.com/grafana/mimir-prometheus/pull/463.

When we added the `optimizeAlternatingLiterals` function, we subtly
broke one edge case. A regexp matcher which matches a single literal,
like `foo=~"bar"` used to return `bar` from `SetMatches()`, but
currently does not. The implication is that the tsdb will first do a
LabelValues call to get all values for `foo`, then match them against
the regexp `bar`. This PR restores the previous behavior which is able
to directly lookup postings for `foo="bar"` instead.
2024-01-02 13:42:01 -06:00
..
exemplar Scraping: use slices.sort for exemplars 2023-11-24 14:42:26 +00:00
histogram Merge pull request #13190 from linasm/fix-float-histogram-add-sub-mutating-argument 2023-11-28 14:04:50 +01:00
labels Fix regexp set matches for literal matchers 2024-01-02 13:42:01 -06:00
metadata Introduce TSDB changes for appending metadata to the WAL (#10972) 2022-07-19 10:58:52 +02:00
relabel Merge branch 'main' of github.com:prometheus/prometheus into document-and-test-relabel-memory-reuse 2023-07-12 15:01:29 +02:00
rulefmt Merge remote-tracking branch 'prometheus/main' into arve/upgrade-exp 2023-10-06 16:11:40 +02:00
textparse Fix error on ingesting out-of-order exemplars (#13021) 2023-11-16 15:07:37 +01:00
timestamp
value