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

[v24.1.x] Address oversized allocs across kafka API and schema registry #18051

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #17876
Fixes: #18046, Fixes: #18048, Fixes: #18049, Fixes: #18050,

michael-redpanda and others added 7 commits April 24, 2024 13:25
- test_many_topics_config

Signed-off-by: Michael Boquard <michael@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit 55436c6)
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)
- test_many_subjects
- test_many_schemas

Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
(cherry picked from commit b2b5732)
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)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone Apr 24, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Apr 24, 2024
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.

clean bp

@michael-redpanda michael-redpanda merged commit 3ce7a93 into redpanda-data:v24.1.x May 1, 2024
19 checks passed
@piyushredpanda piyushredpanda modified the milestones: v24.1.x-next, v24.1.2 May 3, 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.

None yet

4 participants