-
Notifications
You must be signed in to change notification settings - Fork 593
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-5539] Pandaproxy: Avoid large allocations whilst serializing JSON #21469
[v23.3.x] [CORE-5539] Pandaproxy: Avoid large allocations whilst serializing JSON #21469
Conversation
Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit dbf74db) Conflicts: src/v/utils/json.h (was previously moved to container/json.h)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit 432cfb0)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit 20dcf97)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit 60f6717)
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: (all in header includes due to code motion) src/v/pandaproxy/json/requests/create_consumer.h src/v/pandaproxy/json/requests/fetch.h src/v/pandaproxy/json/requests/offset_fetch.h src/v/pandaproxy/json/requests/produce.h
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 schema support)
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 (header includes)
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)
Build failures both looks like: Anyway, it's unrelated. |
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.
assuming this is already reviewed code and just needs a bump. LMK if we need a deeper look.
Most of the conflicts were due to one of either:
|
Force-merging given known failures. |
Backport of PR #20827
Fixes #21296
I took some refactoring changes from #17403 to make life simpler.