Skip to content

HTTPCLIENT-2428: adjust reactor capacity in inflating AsyncDataConsumers #860

Merged
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:HTTPCLIENT-2428
Jul 25, 2026
Merged

HTTPCLIENT-2428: adjust reactor capacity in inflating AsyncDataConsumers #860
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:HTTPCLIENT-2428

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

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 CapacityChannel and scale the increment down by a fixed expansion factor before forwarding it.
InflatingBrotliDataConsumer also stops overriding the downstream capacity with Integer.MAX_VALUE, which defeated back-pressure.

@arturobernalg
arturobernalg requested a review from ok2c July 24, 2026 06:38
…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
arturobernalg merged commit 88c62e7 into apache:master Jul 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants