-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Before the failover pipeline can restore the database from the dump file, it has to drop the existing data.
- For ORACLE, this happens all at once in
dropGocdbUser2.sh - For MariaDB, this happens table by table i.e.:
DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (...);
INSERT INTO `countries` VALUES (...);
This leads to problems (atleast under ORACLE) where if the dump can't be restored, the existing data gets dumped anyway.
I can imagine a similar problem under MariaDB, where by a CREATE TABLE command could fail, which would mean the database would be missing a table and its data.
Before trying to restore the dump to the live database, the failover scripts should try and restore the dump to some dummy dataabse and if (and only if) that's successful, then restore the dump to the live database.
Reactions are currently unavailable