-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: CREATE VIEW or FKs over system tables do not set the system config trigger #17405
Copy link
Copy link
Closed
Closed
Copy link
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
Both CREATE TABLE and CREATE VIEW can modify descriptors of other tables/views than the one being created, to update either their depended-on list (for CREATE VIEW) or their index list (for CREATE TABLE with FKs).
When creating a view over a system table, or creating a new index on a system table for a FK from a non-system table, a system descriptor is updated.
In order to ensure that the update is propagated the KV transaction should be anchored on the system range (using SetSystemConfigTrigger), or cause an error if the anchor is already set.
This is not currently done / checked properly. This causes possible inconsistent state of the system descriptors across the cluster.
Found while working on #17310.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.