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

Stream iterators account for unordered data #4114

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Aug 6, 2021

This fixes a bug where ingester stream iterators assumed their chunks maintained increasing inter chunk order. This is not guaranteed now that unordered writes are available.

This is a followup after closing #4101. Here, we take a much simpler route, adding inter-chunk ordering calculations while iterating through chunks, but importantly do not incur additional slice allocations doing so.

I spent some time attempting to build centralized logic for these calculations in order to reuse it in a few places with duplicate logic, but I was unable to find a working solution that didn't incur slice allocations which I want to avoid on this code path. I do, however, want to revisit these issues post the introduction of generics in go (or if someone sees something I did not).

ref #1544

@owen-d owen-d requested a review from a team as a code owner August 6, 2021 22:30
@owen-d owen-d requested a review from cyriltovena August 6, 2021 22:30
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena merged commit 45693b7 into grafana:main Aug 9, 2021
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.

2 participants