Skip to content

Commit c01f4f1

Browse files
authored
grpc: deprecate WithSharedWriteBuffer and SharedWriteBuffer (#9060)
Since #8957 shared write buffers are always enabled by default and passing `false` is no longer beneficial. This PR deprecates both options per the request in #8966, replacing the `# Experimental` notice with a `Deprecated:` godoc comment consistent with the pattern used elsewhere in `dialoptions.go` and `server.go`. The options are left functional for now; removal can follow in a subsequent release. Fixes #8966 RELEASE NOTES: * grpc: deprecate `WithSharedWriteBuffer` dial option and `SharedWriteBuffer` server option; shared write buffers are now always enabled.
1 parent 6cd0d0c commit c01f4f1

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

dialoptions.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,8 @@ func newJoinDialOption(opts ...DialOption) DialOption {
173173
// If this option is set to true every connection will release the buffer after
174174
// flushing the data on the wire.
175175
//
176-
// # Experimental
177-
//
178-
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
179-
// later release.
176+
// Deprecated: shared write buffer is enabled by default. WithSharedWriteBuffer
177+
// will be removed in a future release.
180178
func WithSharedWriteBuffer(val bool) DialOption {
181179
return newFuncDialOption(func(o *dialOptions) {
182180
o.copts.SharedWriteBuffer = val

server.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,8 @@ func newJoinServerOption(opts ...ServerOption) ServerOption {
250250
// If this option is set to true every connection will release the buffer after
251251
// flushing the data on the wire.
252252
//
253-
// # Experimental
254-
//
255-
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
256-
// later release.
253+
// Deprecated: shared write buffer is enabled by default. SharedWriteBuffer
254+
// will be removed in a future release.
257255
func SharedWriteBuffer(val bool) ServerOption {
258256
return newFuncServerOption(func(o *serverOptions) {
259257
o.sharedWriteBuffer = val

0 commit comments

Comments
 (0)