Skip to content

cleanup legacy Querier iterators code (take 1) #5825

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
merged 5 commits into from
Apr 18, 2024

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Mar 21, 2024

What this PR does:

Take 1 to clean up some legacy code/iterators in Querier. I believe those are code used with the old chunk storage and it is time to clean them up and reuse the Prometheus storage interface as much as possible.

Which issue(s) this PR fixes:
Fixes #

Checklist

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

for set.Next() {
s := set.At()

if sc, ok := s.(SeriesWithChunks); ok {
Copy link
Contributor Author

@yeya24 yeya24 Mar 21, 2024

Choose a reason for hiding this comment

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

I think we use SeriesWithChunks only in streamingSelect when querying Ingesters and the merge already happened there.

I am a little bit unsure why we need to get those chunks again and partition them again into a series set using partitionChunks. Isn't it already a series set from the input? We already only get 1 input series set with chunks since we only have 1 distributor querier.

yeya24 added 3 commits April 4, 2024 18:24
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
@yeya24 yeya24 force-pushed the cleanup-iterators branch from ea4e717 to fcf3338 Compare April 5, 2024 01:25
@yeya24
Copy link
Contributor Author

yeya24 commented Apr 5, 2024

@alanprot Can you please take a look?

yeya24 added 2 commits April 5, 2024 16:12
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
@alanprot
Copy link
Member

I think this LGTM.

@yeya24 yeya24 merged commit 00ffb3c into cortexproject:master Apr 18, 2024
@yeya24 yeya24 deleted the cleanup-iterators branch April 18, 2024 21:25
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