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

Merged
merged 12 commits into from
Jul 17, 2024

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Jul 17, 2024

Backport of PR #21323

Fixes #21466

andrwng and others added 12 commits July 17, 2024 09:24
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: (all due to not JSON Schema support)
  src/v/pandaproxy/schema_registry/json.cc
  src/v/pandaproxy/schema_registry/sharded_store.cc)
  src/v/pandaproxy/schema_registry/test/test_json_schema.cc
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: (no bazel))
  src/v/json/BUILD
  src/v/json/tests/BUILD
Signed-off-by: Ben Pope <ben@redpanda.com>
(cherry picked from commit 328a8b4)

Conflicts:
  src/v/utils/base64.cc (no base64url_to_bytes)
  src/v/utils/tests/BUILD (no bazel)
  src/v/utils/tests/base64_test.cc (no base64url_to_bytes)
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:
  src/v/pandaproxy/schema_registry/json.cc (no Json schema))
  src/v/pandaproxy/schema_registry/types.h (no formatter)
@BenPope BenPope added area/schema-registry Schema Registry service within Redpanda kind/backport PRs targeting a stable branch labels Jul 17, 2024
@BenPope BenPope added this to the v24.1.10 milestone Jul 17, 2024
@BenPope BenPope requested a review from pgellert July 17, 2024 08:53
@BenPope BenPope self-assigned this Jul 17, 2024
@github-actions github-actions bot added area/redpanda area/wasm WASM Data Transforms labels Jul 17, 2024
@BenPope BenPope merged commit dbf848a into redpanda-data:v24.1.x Jul 17, 2024
19 checks passed
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 area/wasm WASM Data Transforms kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants