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

[v23.3.x] Address oversized allocs across kafka API and schema registry #18053

Merged
merged 5 commits into from
Apr 25, 2024

Conversation

michael-redpanda
Copy link
Contributor

@michael-redpanda michael-redpanda commented Apr 24, 2024

Backport of PR #17876

Fixes: CORE-2641
Fixes: #18047

@michael-redpanda michael-redpanda added this to the v23.3.x-next milestone Apr 24, 2024
@michael-redpanda michael-redpanda added the kind/backport PRs targeting a stable branch label Apr 24, 2024
@michael-redpanda michael-redpanda self-assigned this Apr 24, 2024
oleiman and others added 5 commits April 24, 2024 12:19
Previously used std::vector. The goal here is to avoid oversided allocs
in the Kafka API at scale.

Adds overrides for several element types, either becuase the conversion
was non-trivial (e.g. struct is captured by a lambda that must be copyable)
or because the element type is trivially copyable or because we don't expect
the container to get very large. Or a combination of those.

Additional overrides, in order of definition:

- int32_t: std::vector
- model::node_id: std::vector
- model::partition_id: std::vector
- reassignable_partition_response: std::vector
- reassignable_partition: std::vector
- describe_configs_synonym: std::vector
- createable_topic_config: std::vector
- creatable_topic_configs: std::vector
- creatable_replica_assignment: std::vector
- offset_commit_request_partition: std::vector
- offset_commit_response_partition: std::vector
- offset_commit_request_topic: std::vector
- offset_fetch_request_topic: std::vector
- partition_produce_response: std::vector
- creatable_acl_result: std::vector
- listed_group: std::vector
- offset_delete_request_partition: std::vector
- deletable_group_result: std::vector
- delete_acls_matching_acl: std::vector
- txn_offset_commit_request_partition: std::vector
- txn_offset_commit_request_topic: std::vector
- txn_offset_commit_response_partition: std::vector

Removed overrides (now covered by chunked_vector default):

- creatable_topic: chunked_vector
- creatable_topic_configs: chunked_vector
- creatable_topic_result: chunked_vector
- describe_configs_resource_result: chunked_vector
- describe_configs_result: chunked_vector
- incremental_alterable_config: chunked_vector
- incremental_alter_configs_resource: chunked_vector
- alter_configs_resource: chunked_vector
- alterable_config: chunked_vector

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>

Co-authored-by: Michael Boquard <michael@redpanda.com>
(cherry picked from commit 0ef53aa)
And fix a needlessly mutable req_builder

(cherry picked from commit 62e5aa9)
Signed-off-by: Michael Boquard <michael@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit 3aadeec)
Signed-off-by: Michael Boquard <michael@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit 2004a99)
Signed-off-by: Michael Boquard <michael@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit 313d208)
@michael-redpanda michael-redpanda force-pushed the vbotbuildovich/backport-17876-v23.3.x-457 branch from 583c19c to 66b407a Compare April 24, 2024 16:38
@michael-redpanda michael-redpanda marked this pull request as ready for review April 24, 2024 16:38
Copy link
Member

@oleiman oleiman left a comment

Choose a reason for hiding this comment

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

looks like conflicts were include paths and unrelated code. lgtm

@michael-redpanda
Copy link
Contributor Author

CI Failure: #17847

@michael-redpanda michael-redpanda merged commit 04a0b29 into v23.3.x Apr 25, 2024
14 of 17 checks passed
@michael-redpanda michael-redpanda deleted the vbotbuildovich/backport-17876-v23.3.x-457 branch April 25, 2024 02:38
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.14 Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants