-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Deprecate and ignore gateway_implementation
flag to vtgate.
#9482
Conversation
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
go/vt/vtgate/gateway.go
Outdated
// 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)") | ||
_ = flag.String("gateway_implementation", "", "Deprecated. Only tabletgateway is now supported, discoverygateway is no longer available") | ||
GatewayImplementation = new(string) |
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.
just make this GatewayImplementation = &tabletGatewayImplementation
instead of assigning to it from an init
function.
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.
That doesn't work because tabletGatewayImplementation
is declared as a const.
go/vt/vtgate/gateway.go:39:26: cannot take the address of tabletGatewayImplementation
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.
I could change the type of GatewayImplementation
from string*
to string
and change all references, but that will touch lots of files. I'm looking for the minimum necessary change.
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.
@deepthi I see, in that case the minimal change would be making a temp assignment right next to it.
var defaultGatewayImplementation = tabletGatewayImplementation
var GatewayImplementation = &defaultGatewayImplementation
That's the minimal amount of changes and doesn't allocate on heap or use init
,
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Description
VTGate's
gateway_implementation
flag is now deprecated, and any value provided is ignored.tabletgateway
is now the only supported implementation.Related Issue(s)
#9218
Checklist
Deployment Notes
Scripts used to run
vtgate
will need to be updated to drop this flag. It will be removed in a future release (14.0)