-
Notifications
You must be signed in to change notification settings - Fork 592
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
[CORE-5540] [v24.1.x] Pandaproxy: Avoid large allocations whilst serializing JSON #21450
[CORE-5540] [v24.1.x] Pandaproxy: Avoid large allocations whilst serializing JSON #21450
Conversation
Some structures serialize quite large, so in order to avoid oversize allocs, it's necessary to use a buffer type that is not based onn contiguous memmory. Explicitly instantiate all overloads with StringBuffer. Fix the test due to the way name lookup works. Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit 7cea48d)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit ebc4c13)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit 9fcb311)
Namespace changed due to lookup rules for templates. Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit a455d23) Conflicts: src/v/pandaproxy/json/requests/produce.h (utils/tristate))
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit 5d90218)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit d74ec2a) Conflicts: src/v/pandaproxy/schema_registry/handlers.cc (no JSON in this branch)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit f17567f)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit 744b0f0) Conflicts: src/v/pandaproxy/json/requests/produce.h (utils/tristate)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit c676f6e)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit 240c682)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit 8560e0a)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit 6795578)
Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit c934757)
It shouldn't be used in the general case. Signed-off-by: Ben Pope <ben@redpanda.com> (cherry picked from commit ac7c7dd)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. if I'm reading right, 5ecdb7c was the only really hairy one?
Nah, git did it, I didn't have to touch it for the backport, it was clean. |
|
Blocked on the merge for #21323 |
Backport of PR #20827
Fixes #21297