-
Notifications
You must be signed in to change notification settings - Fork 4.6k
grpc: deprecate InitialWindowSize and introduce InitialStreamWindowSize #8789
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
arjan-bal
left a comment
There was a problem hiding this 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.
Done. |
| if te.clientStaticWindow { | ||
| opts = append(opts, grpc.WithStaticStreamWindowSize(te.clientInitialWindowSize)) | ||
| } else { | ||
| opts = append(opts, grpc.WithInitialWindowSize(te.clientInitialWindowSize)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
arjan-bal
left a comment
There was a problem hiding this 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.
test/end2end_test.go
Outdated
| unaryServerInt grpc.UnaryServerInterceptor | ||
| streamServerInt grpc.StreamServerInterceptor | ||
| serverInitialWindowSize int32 | ||
| serverStaticWindow bool |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
| serverStaticWindow bool | ||
| clientStaticWindow bool |
There was a problem hiding this comment.
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.
test/end2end_test.go
Outdated
| unaryServerInt grpc.UnaryServerInterceptor | ||
| streamServerInt grpc.StreamServerInterceptor | ||
| serverInitialWindowSize int32 | ||
| serverStaticWindow bool |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
Fixes: #7923
This PR
WithInitialWindowSizeandWithInitialConnWindowSizedialOptions to enable BDP unconditionally.InitialWindowSizeandInitialConnWindowSizeserver options to enable BDP unconditionally.WithInitialWindowSizedialOption as deprecated and introduce a new dialOptionWithInitialStreamWindowSizewhich just returns WithInitialWindowSize`InitialWindowSizeserver option as deprecated and introduce a new server optionInitialStreamWindowSizewhich just returnsInitialWindowSizeRELEASE NOTES:
WithInitialWindowSizeandWithInitialConnWindowSizedialOptions andInitialWindowSizeandInitialConnWindowSizeserver options to enable BDP unconditionally.WithInitialStreamWindowSizeand a new server optionInitialStreamWindowSizeto enable BDP unconditionally and deprecateWithInitialWindowSizeandInitialWindowSize