vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.67k stars 2.1k forks source link

Feature Request: qualify generated sequence table name #17173

Closed notfelineit closed 1 week ago

notfelineit commented 1 week ago

Feature Description

In https://github.com/vitessio/vitess/pull/16860, Vitess added a feature that auto-created sequence tables for workflows created with --sharded-auto-increment-handling=replace.

Currently, the sequence table names generated in the VSchema are unqualified. This works for cases where the sequence table is unique across al keyspaces.

In the case that a sequence table name might exist in multiple keyspaces, we would have to qualify it. This feature request is to qualify the generated sequence table name with the keyspace from --global-keyspace.

Use Case(s)

If a table with the same name as the to-be-generated sequence (for some reason) already exists in a keyspace that is not the --global-keyspace, we would run into issues with the generated, unqualified sequence table name in the VSchema.