Closed Marigold closed 3 weeks ago
Quick links (staging server): Site | Admin | Wizard |
---|
Login: ssh owid@staging-site-mysql-refresh-swap
Edited: 2024-06-05 08:28:53 UTC Execution time: 1.15 seconds
Not possible because owid user doesn't have privileges to create a new database.
I'm having issues with refreshing MySQL on our staging servers. To keep the data up to date, we have to refresh MySQL after every commit to the ETL. The problem is that there might be a grapher baking process going on at the same time, and it will fail because MySQL is refreshing itself.
This PR makes the refresh process more "atomic" by creating a temporary database first and swapping it at the end. If this doesn't work, we'll have to start locking the database everywhere, which would be annoying.