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

Loki: fix batch iterator error when all chunks overlap and chunk time ranges are greater than query time range #2484

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

slim-bean
Copy link
Collaborator

Fixes a bug where if all chunks are fetched before finding a non-overlapping chunk, and the chunk from/through times are outside of the query request times, we would incorrectly set the iterator from/to bounds leading to missing logs in the query.

…lapping chunk, and the chunk from/through times are outside of the query request times, we would incorrectly set the iterator from/to bounds leading to missing logs in the query.
@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2020

Codecov Report

Merging #2484 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2484      +/-   ##
==========================================
+ Coverage   62.91%   62.97%   +0.06%     
==========================================
  Files         162      162              
  Lines       13998    14003       +5     
==========================================
+ Hits         8807     8819      +12     
+ Misses       4502     4498       -4     
+ Partials      689      686       -3     
Impacted Files Coverage Δ
pkg/storage/batch.go 84.19% <100.00%> (+0.24%) ⬆️
pkg/promtail/targets/file/filetarget.go 69.64% <0.00%> (+1.78%) ⬆️
pkg/promtail/targets/file/tailer.go 78.40% <0.00%> (+4.54%) ⬆️

pkg/storage/batch.go Outdated Show resolved Hide resolved
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

@owen-d owen-d merged commit b8a6135 into master Aug 10, 2020
@owen-d owen-d deleted the fix-batch-all-overlap branch August 10, 2020 20:02
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.

3 participants