Open rvrangel opened 2 hours ago
when working on https://github.com/vitessio/vitess/pull/16295, we noticed both xtrabackup
and builtin
ignore that flag and when we used it as expected in mysqlshell
, @frouioui saw the issues with the restore failing because the data was still there when the restore started.
For us it wasn't an issue since we either restore on an empty tablet or we call the RestoreFromBackup
RPC (which would cause it to be wiped), but it seems that the vtop
tooling doesn't clean tablets once they are restored and relies on this "bug" to complete the restore?
Overview of the Issue
Pulling this discussion out of another PR: Vitess has a flag called
DeleteBeforeRestore
that is supposed to signal the backup engines if they should wipe out the current MySQL data before restoring a backup, but it is currently being ignored by all backup engines (including the new one introduce in https://github.com/vitessio/vitess/pull/16295)We decided to keep the behaviour consistent for now, but this issue is to continue the discussion if we should remove this or fix anything that might be breaking as a result of it.
Reproduction Steps
From the description in here, it seems
vtop
would be relying on the backup engines ignoring that value so that when thevttablet
starts with the--restore-from-backup
it still deletes and restores the databases despite thevtdataroot
already being filled.Binary Version
Operating System and Environment details
Log Fragments
No response