Skip to content
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

rpc: rm rangefeed RPC stream window special case #117545

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions pkg/rpc/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -1785,12 +1785,10 @@ func (rpcCtx *Context) dialOptsCommon(
dialOpts = append(dialOpts, grpc.WithDisableRetry())

// Configure the window sizes with optional env var overrides.
dialOpts = append(dialOpts, grpc.WithInitialConnWindowSize(rpcCtx.initialConnWindowSize(ctx)))
if class == RangefeedClass {
dialOpts = append(dialOpts, grpc.WithInitialWindowSize(rpcCtx.rangefeedInitialWindowSize(ctx)))
} else {
dialOpts = append(dialOpts, grpc.WithInitialWindowSize(rpcCtx.initialWindowSize(ctx)))
}
dialOpts = append(dialOpts,
grpc.WithInitialConnWindowSize(rpcCtx.initialConnWindowSize(ctx)),
grpc.WithInitialWindowSize(rpcCtx.initialWindowSize(ctx)),
)
unaryInterceptors := rpcCtx.clientUnaryInterceptors
unaryInterceptors = unaryInterceptors[:len(unaryInterceptors):len(unaryInterceptors)]
if rpcCtx.Knobs.UnaryClientInterceptor != nil {
Expand Down
10 changes: 0 additions & 10 deletions pkg/rpc/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ type windowSizeSettings struct {
initialWindowSize int32
// initialConnWindowSize is the initial window size for a connection.
initialConnWindowSize int32
// rangefeedInitialWindowSize is the initial window size for a RangeFeed RPC.
rangefeedInitialWindowSize int32
}
}

Expand All @@ -94,8 +92,6 @@ func (s *windowSizeSettings) maybeInit(ctx context.Context) {
if s.values.initialConnWindowSize > maximumWindowSize {
s.values.initialConnWindowSize = maximumWindowSize
}
s.values.rangefeedInitialWindowSize = getWindowSize(ctx,
"COCKROACH_RANGEFEED_RPC_INITIAL_WINDOW_SIZE", RangefeedClass, 2*defaultWindowSize /* 128KB */)
})
}

Expand All @@ -111,12 +107,6 @@ func (s *windowSizeSettings) initialConnWindowSize(ctx context.Context) int32 {
return s.values.initialConnWindowSize
}

// For a RangeFeed RPC.
func (s *windowSizeSettings) rangefeedInitialWindowSize(ctx context.Context) int32 {
s.maybeInit(ctx)
return s.values.rangefeedInitialWindowSize
}

// sourceAddr is the environment-provided local address for outgoing
// connections.
var sourceAddr = func() net.Addr {
Expand Down