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] [CORE-5671] Pandaproxy: Avoid large allocations #21557

Merged
merged 12 commits into from
Jul 22, 2024

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Jul 22, 2024

Backport of PR #21323

Fixes #21467

andrwng and others added 12 commits July 22, 2024 06:27
It's common (especially in tests) to want to get an iobuf from a string.
Adds a convenience method for this.

(cherry picked from commit 06ceb0d)
From post-commit review: redpanda-data#20827 (comment)

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit d5a6516)
An optimisation when parsing a body; the read chunks
should already be a suitable size.

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit fac68ba)
A little drive-by fix.

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit a940e07)
Disable copy for types that hold a schema definition; replacing them
with an explicit `copy()` or `share()`.

Also introduce a `destructure` call to avoid `bugprone-use-after-move`

Fixes [CORE-1138]

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit e189e05)

Conflicts:
  src/v/pandaproxy/schema_registry/json.cc (No JSON Schema)
  src/v/pandaproxy/schema_registry/requests/test/get_subject_versions_version.cc (header includes)
  src/v/pandaproxy/schema_registry/sharded_store.cc (No JSON Schema)
  src/v/pandaproxy/schema_registry/test/test_json_schema.cc (No JSON Schema)
  src/v/pandaproxy/schema_registry/validation.cc (an unused parameter went missing)
Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit 1ded6e9)
Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit 0d10035)

Conflicts:
  src/v/json/BUILD (no bazel)
  src/v/json/tests/BUILD (no bazel)
  src/v/json/tests/json_serialization_test.cc (header includes)
Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit 328a8b4)

Conflicts:
  src/v/utils/base64.cc (no base64_url)
  src/v/utils/tests/BUILD (no bazel)
  src/v/utils/tests/base64_test.cc (no base64_url)
Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit 609db2e)
Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit 0229940)
Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit aa569f8)
Also fixes [CORE-684] [CORE-4446] [CORE-4447]

Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit e7fab4a)

Conflicts: (mostly header includes)
  src/v/pandaproxy/schema_registry/avro.cc
  src/v/pandaproxy/schema_registry/json.cc (no JSON Schemas)
  src/v/pandaproxy/schema_registry/protobuf.cc
  src/v/pandaproxy/schema_registry/storage.h
  src/v/pandaproxy/schema_registry/types.h
  src/v/pandaproxy/schema_registry/util.h
@BenPope BenPope added area/schema-registry Schema Registry service within Redpanda kind/backport PRs targeting a stable branch labels Jul 22, 2024
@BenPope BenPope requested a review from a team July 22, 2024 05:42
@BenPope BenPope self-assigned this Jul 22, 2024
@BenPope BenPope requested review from oleiman and andijcr and removed request for a team July 22, 2024 05:42
@BenPope BenPope requested a review from pgellert July 22, 2024 05:42
@BenPope BenPope added this to the v23.3.19 milestone Jul 22, 2024
@BenPope BenPope merged commit c59c0a6 into redpanda-data:v23.3.x Jul 22, 2024
17 checks passed
@BenPope BenPope modified the milestones: v23.3.19, v23.3.x-next Jul 22, 2024
@BenPope BenPope modified the milestones: v23.3.x-next, v23.3.19 Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda area/schema-registry Schema Registry service within Redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants