You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The VStream API sends a Field event header for a table, prior to the first time it sends row events for a table. It also will send a new Field event if the schema of the table has changed since the last row event.
Currently the attributes sent are those sent by MySQL in its table_map RBR event. This does not include the valid values for Enum and Set columns. For this you need to query information_schema.columns. This has two problems:
Those using the VStream API for Change Data Capture or related applications cannot depend on it for the schema information. They need the connection parameters for the database and make an out-of-band query to merge with the schema information returned by Vitess.
The schema versioning functionality in Vitess is incomplete because it does not track updates to valid enum and set values.
This feature proposes to send valid values for Set and Enum types as part of the VStream API's Field event.
Tasks
Validate Set support in VReplication/VDiff
Changes in Schema Engine to add an optional list of valid values
Modify VStreamer to append this metadata to the field event
Modify schema tracker: add metadata to a new column to _vt.schema_versions
Refactor related tests: currently any change in the Field event requires touching tens of tests. Abstract some stuff out to make this easier in the future and also more readable
The text was updated successfully, but these errors were encountered:
Motivation
The VStream API sends a Field event header for a table, prior to the first time it sends row events for a table. It also will send a new Field event if the schema of the table has changed since the last row event.
Currently the attributes sent are those sent by MySQL in its table_map RBR event. This does not include the valid values for Enum and Set columns. For this you need to query information_schema.columns. This has two problems:
Those using the VStream API for Change Data Capture or related applications cannot depend on it for the schema information. They need the connection parameters for the database and make an out-of-band query to merge with the schema information returned by Vitess.
The schema versioning functionality in Vitess is incomplete because it does not track updates to valid enum and set values.
This feature proposes to send valid values for Set and Enum types as part of the VStream API's Field event.
Tasks
Validate Set support in VReplication/VDiff
Changes in Schema Engine to add an optional list of valid values
Modify VStreamer to append this metadata to the field event
Modify schema tracker: add metadata to a new column to
_vt.schema_versions
Refactor related tests: currently any change in the Field event requires touching tens of tests. Abstract some stuff out to make this easier in the future and also more readable
The text was updated successfully, but these errors were encountered: