Skip to content
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

h2: disable auto read for stream channels #2799

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

Scottmitch
Copy link
Member

Motivation:
HTTP/2 stream/child channel use cases don't disable autoRead explicitly. This means we may read and queue more data than desirable.

Modifications:

  • Disable auto read for h2 stream/child channels.

Copy link
Contributor

@tkountis tkountis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please add a test to catch any re-occurrence in the future.

Also consider adding a comment in NettyChannelPublisher to let the readers know that incoming flow is driven by demand and no extra guards/limits are required for the pending buffer.

Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after @tkountis comments addressed

@Scottmitch Scottmitch force-pushed the h2_autoread branch 3 times, most recently from d8db9cb to 42ce993 Compare January 16, 2024 17:46
Motivation:
HTTP/2 stream/child channel use cases don't disable autoRead
explicitly. This means we may read and queue more data than
desirable.

Modifications:
- Disable auto read for h2 stream/child channels.
@Scottmitch Scottmitch merged commit 904ed6f into apple:main Jan 16, 2024
15 checks passed
@Scottmitch Scottmitch deleted the h2_autoread branch January 16, 2024 21:44
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.

3 participants