website icon indicating copy to clipboard operation
website copied to clipboard

document global keyspace flag

Open maxenglander opened this issue 2 years ago • 1 comments

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.

maxenglander avatar Dec 05 '22 00:12 maxenglander

Returning this to draft status until there's more clarity around next steps for https://github.com/vitessio/vitess/pull/11938

maxenglander avatar Jan 24 '23 20:01 maxenglander