-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure native histograms counter reset hints are corrected when mergi…
…ng results from different sources (#9909) Prometheus will clear the counter reset flag from all chunks since prometheus/prometheus#15343, thus mixing in-order and out-of-order chunks does not lead to over- or under-detecting counter resets. However chunks may be overlapping and the merge algorithm in Mimir has to also fix counter reset over- and under-detection in that case as well. The strategy is to keep track of which non-overlapping iterator a chunk comes from and set the reset hint to unknown whenever the iterator is changed. Similar to what the chained sample iterator does in Prometheus, but a little more complicated. https://github.com/prometheus/prometheus/blob/cd1f8ac129a289be8e7d98b6de57a9ba5814c406/storage/merge.go#L490 * Add krajo's test (currently failing) * Add test showing single ingester return * add failing test * Fix but overdetecting unknowns * Link batches from same iterator * clarify comment * Update pkg/querier/batch/stream.go * Update pkg/querier/batch/stream.go * Fix stream test * Fix nh counter resets when merging overlapping chunks * Set UCR when NCR for some tests * Pass id as constructor arg * Remove unused function * Add tests for checking hints * More complex reset tests * Add interleaving test * Clean up ingester test * Refactor ingester querying tests and add streaming case * Add store-gw tests * Update CHANGELOG Signed-off-by: György Krajcsovits <[email protected]> Co-authored-by: George Krajcsovits <[email protected]>
- Loading branch information
Showing
16 changed files
with
853 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.