Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions go/mysql/conn_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ type ConnParams struct {
SslCert string `json:"ssl_cert"`
SslKey string `json:"ssl_key"`
ServerName string `json:"server_name"`

// The following is only set when the deprecated "dbname" flags are
// supplied and will be removed.
DeprecatedDBName string
}

// EnableSSL will set the right flag on the parameters.
Expand Down
3 changes: 3 additions & 0 deletions go/vt/dbconfigs/dbconfigs.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ func registerPerUserFlags(dbc *userConfig, userKey string) {
flag.StringVar(&dbc.param.SslCaPath, "db-config-"+userKey+"-ssl-ca-path", "", "deprecated: use db_ssl_ca_path")
flag.StringVar(&dbc.param.SslCert, "db-config-"+userKey+"-ssl-cert", "", "deprecated: use db_ssl_cert")
flag.StringVar(&dbc.param.SslKey, "db-config-"+userKey+"-ssl-key", "", "deprecated: use db_ssl_key")

flag.StringVar(&dbc.param.DeprecatedDBName, "db-config-"+userKey+"-dbname", "", "deprecated: dbname does not need to be explicitly configured")

}

// AppWithDB returns connection parameters for app with dbname set.
Expand Down
9 changes: 9 additions & 0 deletions go/vt/servenv/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ var (
// The lower bound for window size is 64K and any value smaller than that will be ignored.
GRPCInitialWindowSize = flag.Int("grpc_server_initial_window_size", 0, "grpc server initial window size")

// EnforcementPolicy MinTime that sets the keepalive enforcement policy on the server.
// This is the minimum amount of time a client should wait before sending a keepalive ping.
GRPCKeepAliveEnforcementPolicyMinTime = flag.Duration("grpc_server_keepalive_enforcement_policy_min_time", 5*time.Minute, "grpc server minimum keepalive time")

authPlugin Authenticator
)

Expand Down Expand Up @@ -143,6 +147,11 @@ func createGRPCServer() {
opts = append(opts, grpc.InitialWindowSize(int32(*GRPCInitialWindowSize)))
}

ep := keepalive.EnforcementPolicy{
MinTime: *GRPCKeepAliveEnforcementPolicyMinTime,
}
opts = append(opts, grpc.KeepaliveEnforcementPolicy(ep))

if GRPCMaxConnectionAge != nil {
ka := keepalive.ServerParameters{
MaxConnectionAge: *GRPCMaxConnectionAge,
Expand Down