Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ create temp database in make refresh and swap it at the end #3684

Closed
wants to merge 1 commit into from

Conversation

Marigold
Copy link
Contributor

@Marigold Marigold commented Jun 5, 2024

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.

@owidbot
Copy link
Contributor

owidbot commented Jun 5, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-mysql-refresh-swap

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-06-05 08:28:53 UTC
Execution time: 1.15 seconds

@Marigold
Copy link
Contributor Author

Marigold commented Jun 5, 2024

Not possible because owid user doesn't have privileges to create a new database.

@Marigold Marigold closed this Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants