Skip to content
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

Don't reuse cached results when query is not step-aligned. #424

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

pstibrany
Copy link
Member

What this PR does: This PR fixes bug when cached results for step-aligned queries were reused when running query that is not step-aligned. Reusing cached result in such case ends in wrong result being returned by Mimir.

Checklist

  • Tests updated
  • [na] Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

integration/query_frontend_cache_test.go Outdated Show resolved Hide resolved
"github.com/grafana/mimir/integration/e2emimir"
)

func TestQueryFrontendUnalignedQuery(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind running the same test also with -query-frontend.max-sharded-queries-limit-enabled=true, please?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added test using new middleware too.

pstibrany and others added 3 commits October 28, 2021 09:56
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
Removed "Provenance-includes" statements.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
@pstibrany pstibrany force-pushed the dont-reuse-cached-results-for-unaligned-queries branch from e140dbb to f9f1ebc Compare October 28, 2021 08:08
@pstibrany
Copy link
Member Author

Thanks for reviews!

@pstibrany pstibrany enabled auto-merge (squash) October 28, 2021 08:09
@pstibrany pstibrany merged commit 749b32d into main Oct 28, 2021
@pstibrany pstibrany deleted the dont-reuse-cached-results-for-unaligned-queries branch October 28, 2021 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants