Skip to content

Conversation

@eshitachandwani
Copy link
Member

@eshitachandwani eshitachandwani commented Dec 24, 2025

Fixes: #7923

This PR

  • Changes the behavior of WithInitialWindowSize and WithInitialConnWindowSize dialOptions to enable BDP unconditionally.
  • Changes the behavior of InitialWindowSize and InitialConnWindowSize server options to enable BDP unconditionally.
  • Mark WithInitialWindowSize dialOption as deprecated and introduce a new dialOption WithInitialStreamWindowSize which just returns WithInitialWindowSize`
  • Mark InitialWindowSize server option as deprecated and introduce a new server option InitialStreamWindowSize which just returns InitialWindowSize
  • Changes the test accordingly

RELEASE NOTES:

  • grpc:
    • Update WithInitialWindowSize and WithInitialConnWindowSize dialOptions and InitialWindowSize and InitialConnWindowSize server options to enable BDP unconditionally.
    • Introduce a new dialOption WithInitialStreamWindowSize and a new server option InitialStreamWindowSize to enable BDP unconditionally and deprecate WithInitialWindowSize and InitialWindowSize

@eshitachandwani eshitachandwani added this to the 1.79 Release milestone Dec 24, 2025
@eshitachandwani eshitachandwani added Type: Bug Type: Feature New features or improvements in behavior and removed Type: Bug labels Dec 24, 2025
@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.29%. Comparing base (4046676) to head (e91fa27).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
server.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8789      +/-   ##
==========================================
- Coverage   83.42%   83.29%   -0.13%     
==========================================
  Files         418      418              
  Lines       32897    32897              
==========================================
- Hits        27443    27403      -40     
- Misses       4069     4086      +17     
- Partials     1385     1408      +23     
Files with missing lines Coverage Δ
dialoptions.go 91.09% <100.00%> (+2.02%) ⬆️
server.go 83.02% <0.00%> (+0.39%) ⬆️

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@arjan-bal arjan-bal left a comment

Choose a reason for hiding this comment

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

If you're using changes from the previous unmerged PR #8665, please cherry-pick and squash the commits from the original author for proper attribution.

@eshitachandwani
Copy link
Member Author

If you're using changes from the previous unmerged PR #8665, please cherry-pick and squash the commits from the original author for proper attribution.

Done.

if te.clientStaticWindow {
opts = append(opts, grpc.WithStaticStreamWindowSize(te.clientInitialWindowSize))
} else {
opts = append(opts, grpc.WithInitialWindowSize(te.clientInitialWindowSize))
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add tests with both WithInitialStreamWindowSize and WithInitialWindowSize options to ensure both code paths are verified if they diverge in future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@mbissa mbissa removed their assignment Dec 26, 2025
Copy link
Contributor

@arjan-bal arjan-bal left a comment

Choose a reason for hiding this comment

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

Please make the release notes imperative sentences, e.g.: Update WithInitialWindowSize and WithInitialConnWindowSize to enable BDP unconditionally..

Please combine similar changes to a single release note. For example, all the changes to the existing options can be a single note and the introduction of the new options can be a separate note.

unaryServerInt grpc.UnaryServerInterceptor
streamServerInt grpc.StreamServerInterceptor
serverInitialWindowSize int32
serverStaticWindow bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this variable be given a more boolean like name like isServerWindowStatic or useStaticServerWindow?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

isServerWindowStatic reads more like natural English and answers the question "Is the server window static?". isServerStaticWindow feels less natural. Please change.

clientInitialWindowSize int32
clientUseInitialStreamWindowSize bool
clientInitialConnWindowSize int32
clientStaticWindow bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the server side boolean, please change re-name to isClientWindowStatic

Comment on lines +5449 to +5450
serverStaticWindow bool
clientStaticWindow bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename the variables to be similar to isClientWindowStatic and isServerWindowStatic.

unaryServerInt grpc.UnaryServerInterceptor
streamServerInt grpc.StreamServerInterceptor
serverInitialWindowSize int32
serverStaticWindow bool
Copy link
Contributor

Choose a reason for hiding this comment

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

isServerWindowStatic reads more like natural English and answers the question "Is the server window static?". isServerStaticWindow feels less natural. Please change.

clientUseInitialStreamWindowSize: true,
}
for _, e := range listTestEnv() {
testConfigurableWindowSize(t, e, wc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this test explicitly assert the static/dynamic behavior of the client/server windows? I would expect the test to break if the window type changes unexpectedly. Is that currently covered?

@mbissa mbissa removed their assignment Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New features or improvements in behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a way to adjust the initial window size that does not also disable BDP estimation

4 participants