HTTPCLIENT-2428: adjust reactor capacity in inflating AsyncDataConsumers #860
Open
arturobernalg wants to merge 1 commit into
Open
HTTPCLIENT-2428: adjust reactor capacity in inflating AsyncDataConsumers #860arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
ok2c
approved these changes
Jul 24, 2026
ok2c
approved these changes
Jul 24, 2026
|
|
||
| @Override | ||
| public void update(final int increment) throws IOException { | ||
| if (increment <= 0) { |
Member
There was a problem hiding this comment.
@arturobernalg I would also make a special check and pass Integer#MAX_VALUE along without expansion factor.
Member
Author
There was a problem hiding this comment.
@ok2c Done. Integer.MAX_VALUE is now forwarded unchanged
…rs to match decompressed output Inflating consumers now request proportionally fewer compressed bytes than the downstream consumer's advertised (decompressed) capacity, so decompression no longer overshoots it; InflatingBrotliDataConsumer also stops overriding the downstream capacity with Integer.MAX_VALUE.
arturobernalg
force-pushed
the
HTTPCLIENT-2428
branch
from
July 24, 2026 08:45
64eebc4 to
35061f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inflating consumers forwarded the downstream capacity (decompressed bytes) to the reactor unchanged, so decompression could expand it and overshoot the requested capacity.
They now wrap the
CapacityChanneland scale the increment down by a fixed expansion factor before forwarding it.InflatingBrotliDataConsumeralso stops overriding the downstream capacity withInteger.MAX_VALUE, which defeated back-pressure.