Change local_metadata.value to MEDIUMBLOB#5380
Conversation
go/vt/mysqlctl/backup.go
Outdated
There was a problem hiding this comment.
If local_metadata fails, it could cause integrations like Orchestrator to exhibit unexpected behavior. Did we ever have PopulateMetadataTables optional like this before? Or was it always required?
There was a problem hiding this comment.
That is a valid point. Which is worse, the tablet not coming up after restore or providing the wrong metadata to orchestrator?
For instance, a failure to populate metadata might mean that the newly restored tablet advertises the same alias as an existing running tablet, and that would surely confuse orchestrator.
As far as history goes, from the time it was introduced, an error populating metadata has always been fatal.
Keep _vt.local_metadata table across backup-restore operations.
So far local_metadata contained only data needed for Orchestrator and we didn't
need to preserve that data across restores because it was about the vttablet
running near MySQL. With the plan to store some data about the database itself
(e.g. id of a schema swap already executed on the database) we need to save
the table's contents in a backup and preserve it after restore.
This change achieves that. The data used by Orchestrator gets repopulated
immediately after restore, so that functionality is not changed.
There was a problem hiding this comment.
I have reverted this change. If we ever decide to do it, it can be a separate PR.
go/vt/mysqlctl/metadata_tables.go
Outdated
There was a problem hiding this comment.
If this is run again, does it result in the same ERDupFieldName error that we already ignore?
Also, do we need to add NOT NULL to match the CREATE TABLE version?
There was a problem hiding this comment.
Running again produces no errors.
We don't need to add NOT NULL. Changing the column type doesn't change its nullable status.
You are correct about NOT NULL. I will make the change.
…ion positions. Signed-off-by: deepthi <deepthi@planetscale.com>
ec506b2 to
6c6a70a
Compare
|
Tested manually that the |
To accomodate long replication positions, change type of column.
Fixes #5377
Signed-off-by: deepthi deepthi@planetscale.com