website
website copied to clipboard
document global keyspace flag
Accompanies vitessio/vitess#11876.
Description
Vitess supports globally routing queries to unique tables when the connection does not have a default keyspace and the tables in the FROM list are not keyspace-qualified.
This adds support for explicitly requesting global routing:
- Adds a VTGate flag --global-keyspace that can be specified multiple times.
- When a connection uses a --global-keyspace, it behaves the same was as if no default keyspace is set on the connection.
- When a query for a table is qualified with a --global-keyspace, it is routed to a globally unique table, even if it is in a different keyspace than the current database.
Use cases
This feature is useful for frameworks like Hibernate which are required by to set a database name on the connection. Those frameworks are unable to take advantage of global routing.
Returning this to draft status until there's more clarity around next steps for https://github.com/vitessio/vitess/pull/11938