Fix Version/s: None
Team:Data Access and Database
There have been cases when processing queries on the wide tables failed due to MySQL size constraints in table qservMeta.QInfo. The problems were reported as:
Apparently, this is caused by the MySQL type TEXT used in definitions of table's columns:
The maximum length of a string to be stored in columns of this type is limited by 64 KB.
Hence a goal is to replace the type for all three columns to MEDIUMTEXT in the Qserv schema initialization files, procedures, etc. This would raise the limit up to 16 MB which is supposed to cover all present and foreseeable use cases.
- Upgrade schema definition file
- Upgrade the smig definition files to facilitate schema upgrade of existing instances
The proposed fix has been tested and confirmed to solve the problem in production databases.
The schema can be upgraded using the following sequence of the SQL statements:
NOTE: locking the table is recommended on the live instances of Qserv to prevent Qserv czar from operating on the inconsistent state of the table while it's being migrated.
Do NOT upgrade schema version in the database before a new version (as per this ticket) of Qserv is deployed in the production instances. Otherwise, Qserv will stop working. The number should only be upgraded before deploying the new version of Qserv using:
The schema can also be upgraded using smig.