Skip to content

Commit

Permalink
Merge pull request #9482 from planetscale/ds-ignore-gateway-flag
Browse files Browse the repository at this point in the history
Deprecate and ignore `gateway_implementation` flag to vtgate.
  • Loading branch information
deepthi authored Jan 18, 2022
2 parents cb22244 + e9caecd commit 20df931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions doc/releasenotes/13_0_0_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

## Major Changes

### vtgate -gateway_implementation flag is deprecated (and ignored)
Support for `discoverygateway` is being dropped. `tabletgateway` is now the only supported implementation. Scripts using this flag should be updated to remove the flag as it will be deleted in the next release.

### vttablet -use_super_read_only flag now defaults to true
The default value used to be false. What this means is that during a failover, we will set `super_read_only` on database flavors that support them (MySQL 5.7+ and Percona 5.7+).
In addition, all Vitess-managed databases will be started with `super-read-only` in the cnf file.
Expand Down
10 changes: 6 additions & 4 deletions go/vt/vtgate/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ import (
// a query targeted to a keyspace/shard/tablet_type and send it off.

var (
// GatewayImplementation allows you to choose which gateway to use for vtgate routing. Defaults to tabletgateway, other option is discoverygateway
GatewayImplementation = flag.String("gateway_implementation", "tabletgateway", "Allowed values: discoverygateway (deprecated), tabletgateway (default)")
bufferImplementation = flag.String("buffer_implementation", "keyspace_events", "Allowed values: healthcheck (legacy implementation), keyspace_events (default)")
initialTabletTimeout = flag.Duration("gateway_initial_tablet_timeout", 30*time.Second, "At startup, the gateway will wait up to that duration to get one tablet per keyspace/shard/tablettype")
_ = flag.String("gateway_implementation", "", "Deprecated. Only tabletgateway is now supported, discoverygateway is no longer available")
// We cannot reference tabletGatewayImplementation directly because it is const
defaultGatewayImplementation = tabletGatewayImplementation
GatewayImplementation = &defaultGatewayImplementation
bufferImplementation = flag.String("buffer_implementation", "keyspace_events", "Allowed values: healthcheck (legacy implementation), keyspace_events (default)")
initialTabletTimeout = flag.Duration("gateway_initial_tablet_timeout", 30*time.Second, "At startup, the gateway will wait up to that duration to get one tablet per keyspace/shard/tablettype")
// RetryCount is the number of times a query will be retried on error
// Make this unexported after DiscoveryGateway is deprecated
RetryCount = flag.Int("retry-count", 2, "retry count")
Expand Down

0 comments on commit 20df931

Please sign in to comment.