Skip to content

Conversation

@Pramodh-G
Copy link

Part of #7923.

Since it has been two releases after #8283 is merged, we can introduceInitialStreamWindowSize on both server and client, while deprecating InitialWindowSize.

RELEASE NOTES:

  • grpc: Introduce new ServerOption and ClientOption to set stream window size without disabling BDP estimation.

  • grpc: Behavior change in WithInitialWindowSize in ClientOption and InitialWindowSize in ServerOption. Using these options will no longer disable BDP estimation. To explicitly disable BDP estimation, please use `StaticStreamWindowSize options.

  • grpc: Mark WithInitialWindowSize for deprecation, to be replaced with WithInitialStreamWindowSize in ClientOption. Similarly, for InitialWindowSize inServerOption to be replaced with InitialStreamWindowSize.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 21, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Part of grpc#7923.

Since it has been two releases after grpc#8283 is merged, we can
introduce InitialStreamWindowSize on both server and client, while
deprecating InitialWindowSize.

RELEASE NOTES:

* grpc: Introduce new ServerOption and ClientOption to set stream
window size without disabling BDP estimation.

* grpc: Behavior change in WithInitialWindowSize in ClientOption
and InitialWindowSize in ServerOption. Using these options will no
longer disable BDP estimation. To explicitly disable BDP estimation,
please use *StaticStreamWindowSize options.

* grpc: Mark WithInitialWindowSize for deprecation, to be replaced
with WithInitialStreamWindowSize in ClientOption. Similarly, for
InitialWindowSize inServerOption to be replaced with InitialStreamWindowSize.
@eshitachandwani
Copy link
Member

@Pramodh-G , the tests seem to be failing , could you please make sure that the tests are passing before we review it?

@eshitachandwani eshitachandwani added this to the 1.77 Release milestone Oct 22, 2025
@eshitachandwani eshitachandwani added the Type: Behavior Change Behavior changes not categorized as bugs label Oct 22, 2025
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.99%. Comparing base (f448a97) to head (6049a80).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8665      +/-   ##
==========================================
+ Coverage   81.97%   81.99%   +0.02%     
==========================================
  Files         417      417              
  Lines       40788    40806      +18     
==========================================
+ Hits        33435    33459      +24     
+ Misses       5991     5957      -34     
- Partials     1362     1390      +28     
Files with missing lines Coverage Δ
dialoptions.go 91.22% <100.00%> (+1.90%) ⬆️
server.go 82.14% <100.00%> (+0.23%) ⬆️

... and 24 files with indirect coverage changes

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

@Pramodh-G
Copy link
Author

@eshitachandwani / @dfawley: Please take a look. Tests are passing now.

// smaller than that will be ignored.
//
// Deprecated: use WithInitialStreamWindowSize to set a stream window size without disabling
// dynamic flow control.
Copy link
Member

Choose a reason for hiding this comment

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

Can you please make sure the comments are restricted to 80 cols?

Comment on lines +232 to +235
// WithInitialStreamWindowSize returns a DialOption which sets the value for
// a initial window size on a stream. The lower bound for window size is 64K
// and any value smaller than that will be ignored. Importantly, this does
// not disable dynamic flow control.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// WithInitialStreamWindowSize returns a DialOption which sets the value for
// a initial window size on a stream. The lower bound for window size is 64K
// and any value smaller than that will be ignored. Importantly, this does
// not disable dynamic flow control.
// WithInitialStreamWindowSize returns a DialOption which sets the value for
// a initial window size on a stream without disabling dynamic flow control.
// The lower bound for window size is 64K and any value smaller than that
// will be ignored.

// InitialWindowSize returns a ServerOption that sets window size for stream.
// The lower bound for window size is 64K and any value smaller than that will be ignored.
//
// Deprecated: use InitialStreamWindowSize to set a stream window size without disabling
Copy link
Member

Choose a reason for hiding this comment

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

Please ensure comments are restricted to 80 cols.

Comment on lines +299 to +301
// InitialStreamWindowSize returns a ServerOption that sets the window size for a stream.
// THe lower bound for a window size is 64K, and any value smaller than that will be ignored.
// Importantly, this does not disable dynamic flow control.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// InitialStreamWindowSize returns a ServerOption that sets the window size for a stream.
// THe lower bound for a window size is 64K, and any value smaller than that will be ignored.
// Importantly, this does not disable dynamic flow control.
// InitialStreamWindowSize returns a ServerOption that sets the window size for
// a stream without disabling dynamic flow control. The lower bound for a window
// size is 64K, and any value smaller than that will be ignored.

unaryServerInt grpc.UnaryServerInterceptor
streamServerInt grpc.StreamServerInterceptor
serverInitialWindowSize int32
serverStaticWindowSize bool
Copy link
Member

Choose a reason for hiding this comment

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

The variable name seems misleading. serverStaticWindowSize indicates that it should take size for static window as input whereas it takes a boolean. We could either change the variable name to indicate it is boolean, maybe something like isServerWindowStatic or staticServerWindow or something better. OR we could keep the same name and change the logic to actually take the window size and make sure if it is set we use the grpc.StaticStreamWindowSize option. Personally , the second option seems better to me.

Comment on lines +5388 to +5389
serverStaticWindowSize bool
clientStaticWindowSize bool
Copy link
Member

Choose a reason for hiding this comment

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

Similar concern with the variable names here.

clientConn int32
}

func (s) TestConfigurableWindowSizeWithLargeWindow(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could also add tests to verify the new behavior i.e. not disable BDP estimation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Behavior Change Behavior changes not categorized as bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants