-
Notifications
You must be signed in to change notification settings - Fork 183
combine json chunks from requests #4317
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
base: main
Are you sure you want to change the base?
combine json chunks from requests #4317
Conversation
Thanks for the fix @jiapingzeng! Wondering if you see any additional latency due to combining the chunks? |
I didn't notice additional latency from my side. There are some concerns of collectList() running out of memory when waiting for an infinite upstream: https://stackoverflow.com/a/72042404, but I don't think that applies here as agent execute requests are a few kBs at most. |
Don't think test failure is related to my change. Tried |
Signed-off-by: Jiaping Zeng <jpz@amazon.com>
84ea119
to
8292d74
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4317 +/- ##
============================================
- Coverage 80.14% 80.11% -0.04%
+ Complexity 10171 10165 -6
============================================
Files 854 854
Lines 44219 44227 +8
Branches 5113 5114 +1
============================================
- Hits 35439 35432 -7
- Misses 6630 6647 +17
+ Partials 2150 2148 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
||
Flux.from(channel).ofType(HttpChunk.class).concatMap(chunk -> { | ||
final CompletableFuture<HttpChunk> future = new CompletableFuture<>(); | ||
Flux.from(channel).ofType(HttpChunk.class).collectList().flatMap(chunks -> { |
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.
Is this possible to add some unit tests?
Description
[Describe what this change achieves]
Related Issues
4314
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.