-
Notifications
You must be signed in to change notification settings - Fork 834
Fix Redis cache error when a query has no chunks to lookup #2700
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
Merged
Conversation
This file contains hidden or 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
pstibrany
approved these changes
Jun 9, 2020
jtlisi
approved these changes
Jun 10, 2020
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
Signed-off-by: Marco Pracucci <[email protected]>
Signed-off-by: Marco Pracucci <[email protected]>
…ommand' Signed-off-by: Marco Pracucci <[email protected]>
|
@pstibrany @jtlisi I've done further changes after your initial review. May you take another look, please? |
jtlisi
approved these changes
Jun 14, 2020
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
pstibrany
approved these changes
Jun 15, 2020
cyriltovena
added a commit
to cyriltovena/cortex
that referenced
this pull request
Jun 26, 2020
This was introduce in cortexproject#2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]>
3 tasks
pstibrany
pushed a commit
to grafana/cortex
that referenced
this pull request
Jun 26, 2020
This was introduce in cortexproject#2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]>
pracucci
pushed a commit
that referenced
this pull request
Jun 26, 2020
* Fixes an issue in the index chunks/series intersect code. This was introduce in #2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]> * Update changelog. Signed-off-by: Cyril Tovena <[email protected]>
pstibrany
pushed a commit
to grafana/cortex
that referenced
this pull request
Jun 26, 2020
This was introduce in cortexproject#2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]> (cherry picked from commit 1ff971d)
bboreham
pushed a commit
that referenced
this pull request
Jun 26, 2020
* Fixes an issue in the index chunks/series intersect code. This was introduce in #2700, more specifically this line https://github.com/cortexproject/cortex/pull/2700/files#diff-10bca0f4f31a2ca1edc507d0289b143dR537 This causes any query with the first label matcher not matching anything to return all matches of all other labels. This is a nasty one since, the code was relying on empty slice, and so it would skip nil values instead of returning no matches. I've added a regression test proving this is fixed everywhere. I think in cortex it can probably affect performance (since you have to download all chunk not required) but not read integrity. I have found this with @slim-bean while deploying Loki, all queriers where OOMing because of this. Signed-off-by: Cyril Tovena <[email protected]> * Update changelog. Signed-off-by: Cyril Tovena <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does:
Redis chunks cache lookup can fail with the error
ERR wrong number of arguments for 'mget' commandif a query has no chunks to lookup from storage. This happens because we don't correctly handle the caseSeriesStore.GetChunkRefs()returns no chunks.Which issue(s) this PR fixes:
Fixes #2133
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]