fix: sync local flow controller initial window with SETTINGS value - #16431
Open
waterWang wants to merge 1 commit into
Open
fix: sync local flow controller initial window with SETTINGS value#16431waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
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.
Problem
The Triple HTTP/2 client advertises a stream window size via SETTINGS (
SETTINGS_INITIAL_WINDOW_SIZE) but the localHttp2LocalFlowControllerretains the Netty default of 65,535 bytes. This mismatch causes two failure modes:Root Cause
In
createHttp2ClientConnection()andcreateHttp2ServerConnection(), a customTripleHttp2LocalFlowControlleris created and attached to the connection, but its initial window size is never updated from the default 65,535 to match the value broadcast in the SETTINGS frame. The local flow controller enforces a smaller window than what was advertised to the peer.Fix
After attaching the flow controllers, call
connection.local().flowController().initialWindowSize(initialWindowSize)to synchronize the local enforcement window with the advertised SETTINGS value. This is applied in bothcreateHttp2ClientConnection()andcreateHttp2ServerConnection().Fixes #16427