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

Fixes a bug that would add __error__ label incorrectly. #2796

Merged
merged 1 commit into from
Oct 23, 2020

Conversation

cyriltovena
Copy link
Contributor

Wrong usage of slices would add error label to the original set of labels.

Signed-off-by: Cyril Tovena cyril.tovena@gmail.com

Wrong usage of slices would add error label to the original set of labels.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@cyriltovena cyriltovena changed the title Fixes a bug that would add __error__ labels incorrectly. Fixes a bug that would add __error__ label incorrectly. Oct 23, 2020
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov-io
Copy link

Codecov Report

Merging #2796 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2796      +/-   ##
==========================================
- Coverage   61.42%   61.39%   -0.03%     
==========================================
  Files         177      177              
  Lines       14373    14373              
==========================================
- Hits         8828     8825       -3     
- Misses       4738     4740       +2     
- Partials      807      808       +1     
Impacted Files Coverage Δ
pkg/logql/log/labels.go 93.75% <100.00%> (ø)
pkg/promtail/targets/file/filetarget.go 64.08% <0.00%> (-2.12%) ⬇️

@cyriltovena cyriltovena merged commit 3f93b5b into grafana:master Oct 23, 2020
cyriltovena added a commit to cyriltovena/loki that referenced this pull request Jun 11, 2021
* Fixes an issue in the index chunks/series intersect code.

This was introduce in grafana#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 <cyril.tovena@gmail.com>

* Update changelog.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
cyriltovena added a commit to cyriltovena/loki that referenced this pull request Jun 11, 2021
* Fixes an issue in the index chunks/series intersect code.

This was introduce in grafana#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 <cyril.tovena@gmail.com>

* Update changelog.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants