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

Register block-builder target in mimir #9315

Merged
merged 3 commits into from
Sep 26, 2024
Merged

Conversation

narqo
Copy link
Contributor

@narqo narqo commented Sep 17, 2024

What this PR does

This one seats atop #9199 for now

This is part of #8635; refer to it for more details.

Here we register the block-builder target in mimir. The block-builder is still in an earlier experiment, thus don't expose any documentation or changelog for now.

Also, the PR addresses the discussion we had with @dimitarvdimitrov in #9199 (comment) about a potential edge-case for a partition that has offset gaps. Here we refactor the internals of the consumer loop replacing the use of remaining lag with the reference to the partition end, at the time of the cycle.

Checklist

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

@narqo narqo force-pushed the vldmr/bb-upstream-enable-target branch 5 times, most recently from 89a7ab2 to 6e009ae Compare September 25, 2024 19:54
@narqo narqo force-pushed the vldmr/bb-upstream-enable-target branch from 6e009ae to 49ea29f Compare September 25, 2024 19:58
Signed-off-by: Vladimir Varankin <[email protected]>
@narqo narqo force-pushed the vldmr/bb-upstream-enable-target branch from 49ea29f to f61c7ea Compare September 25, 2024 20:01
@narqo narqo marked this pull request as ready for review September 25, 2024 20:01
@narqo narqo requested a review from a team as a code owner September 25, 2024 20:01
@narqo narqo closed this Sep 25, 2024
@narqo narqo deleted the vldmr/bb-upstream-enable-target branch September 25, 2024 20:02
@narqo narqo restored the vldmr/bb-upstream-enable-target branch September 25, 2024 20:02
@narqo narqo reopened this Sep 25, 2024
@pracucci pracucci self-requested a review September 26, 2024 06:38
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

I'm very glad you got rid of remaining offsets. LGTM.

Also, the PR addresses the discussion we had with @dimitarvdimitrov in #9199 (comment) about a potential edge-case for a partition that has offset gaps.

Can we unit test it? Or is it too complicated because we can't create gaps in the mocked Kafka cluster?

pkg/blockbuilder/blockbuilder.go Outdated Show resolved Hide resolved
Signed-off-by: Vladimir Varankin <[email protected]>
@@ -123,6 +124,7 @@ type Config struct {
Worker querier_worker.Config `yaml:"frontend_worker"`
Frontend frontend.CombinedFrontendConfig `yaml:"frontend"`
IngestStorage ingest.Config `yaml:"ingest_storage"`
BlockBuilder blockbuilder.Config `yaml:"block_builder" doc:"hidden"`
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this part of ingest storage? i mean we use the same kafka config and it's rightly coupled with kafka just like ingest storage

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's fair having a root leve config. Ingest storage is the config shared between component. This config is block-builder specific.

Copy link
Contributor Author

@narqo narqo Sep 26, 2024

Choose a reason for hiding this comment

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

+1 to what Marco says. For me, ingest-storage is a package, that services like ingester, query-frontend, ruler, and now block-builder use. I.e. block-builder is not a feature of the ingest-storage package, it's the opposite.

I agree, though, that "block-builder, the service" is a feature of the "ingest-storage architecture" 🤷

@@ -123,6 +124,7 @@ type Config struct {
Worker querier_worker.Config `yaml:"frontend_worker"`
Frontend frontend.CombinedFrontendConfig `yaml:"frontend"`
IngestStorage ingest.Config `yaml:"ingest_storage"`
BlockBuilder blockbuilder.Config `yaml:"block_builder" doc:"hidden"`
Copy link
Contributor

Choose a reason for hiding this comment

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

why hidden? Ingest storage is just experimental

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't feel strong about it, but I am not comfortable exposing anything about block-builder to the user-visible helps. Block-builder is even more experimental than ingest-storage.

@narqo
Copy link
Contributor Author

narqo commented Sep 26, 2024

Can we unit test it? Or is it too complicated because we can't create gaps in the mocked Kafka cluster?

For now, I cannot think of a way to replicate that in a controlled manner, so will need some exploration. I will add it to the rest of the "more tests" PRs later.

@narqo narqo merged commit aa7f5b0 into main Sep 26, 2024
29 checks passed
@narqo narqo deleted the vldmr/bb-upstream-enable-target branch September 26, 2024 10:19
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