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 chunks from storegateway to queriers #5182

Merged
merged 85 commits into from
Jul 18, 2023
Merged

Conversation

codesome
Copy link
Member

@codesome codesome commented Jun 6, 2023

What this PR does

Streams chunks from store gateways to querier.

Store gateway first fetches the series from the storage (only series labels now; the chunk refs are skipped). After sending the series labels to the queriers, store gateway now starts sending the chunks for the series in the same order the series were sent.

In both case, when sending series and chunks, the series are batched together to save on CPU. The max batch size is configurable.

Additional proto fields have been added specifically for this.

Which issue(s) this PR fixes or relates to

Fixes #TODO

Checklist

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

codesome added 2 commits June 6, 2023 20:16
@codesome codesome force-pushed the codesome/stream-store branch from e958e8a to 1d8f18b Compare June 6, 2023 15:09
codesome added 3 commits June 7, 2023 16:00
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
@codesome codesome force-pushed the codesome/stream-store branch from d7464f9 to e2d189a Compare June 8, 2023 12:40
Copy link
Contributor

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

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

Noticed a couple of small things as I was reading through this.

@codesome codesome force-pushed the codesome/stream-store branch 2 times, most recently from 9d13f2f to 3054be1 Compare June 12, 2023 07:28
@codesome codesome force-pushed the codesome/stream-store branch from cc125c3 to 42c4e08 Compare June 12, 2023 07:55
codesome added 12 commits June 12, 2023 14:58
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

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

I left a few comments, most of the are around code structure, but there are a few that I think need addressing before we can merge this. Will you take a look?

codesome added 3 commits July 5, 2023 17:42
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
@codesome codesome force-pushed the codesome/stream-store branch from c2139d0 to 3002e83 Compare July 6, 2023 07:52
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

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

Massive work! Thanks for addressing my comments. I checked the diff since my last review and the changes LGTM.

There are still two points about metrics

  • the batch load/wait durations that are erroneously reported
  • the cache lookups, which don't seem deterministic. The assertions on cache lookups in testQuerierWithBlocksStorageRunningInMicroservicesMode become much weaker if we use the GreaterThan instead of Equal. I'd like to understand why they are non-deterministic before merging this as-is.

Signed-off-by: Ganesh Vernekar <[email protected]>
@codesome
Copy link
Member Author

codesome commented Jul 6, 2023

the batch load/wait durations that are erroneously reported

This should be fixed now in the last commit

Copy link
Contributor

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

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

This is looking good, I've done one last pass over the changes to the querier.

codesome and others added 5 commits July 7, 2023 14:09
Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: Ganesh Vernekar <[email protected]>
…5459)

* Add test for polluted series hash cache with streaming

Signed-off-by: Dimitar Dimitrov <[email protected]>

* Fix series hash cache corruption

Signed-off-by: Dimitar Dimitrov <[email protected]>

* Update pkg/storegateway/series_refs_test.go

---------

Signed-off-by: Dimitar Dimitrov <[email protected]>
Co-authored-by: Ganesh Vernekar <[email protected]>
Copy link
Contributor

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

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

LGTM modulo one last comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants