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

ensure mysql migrations run safely w/ multiple nodes #58

Open
pjenvey opened this issue Sep 19, 2018 · 1 comment
Open

ensure mysql migrations run safely w/ multiple nodes #58

pjenvey opened this issue Sep 19, 2018 · 1 comment
Labels
bug Something isn't working p3

Comments

@pjenvey
Copy link
Member

pjenvey commented Sep 19, 2018

Although diesel's migrations run in a transaction, we're backed by mysql where DDL statements implicitly commit. Thus migrations could become problematic with multiple nodes deployed simultaneously.

We could likely lock the migration table separately during migrations. Maybe diesel migrations could do this for us.

@pjenvey pjenvey added bug Something isn't working p2 p3 and removed p2 labels Sep 19, 2018
@pjenvey
Copy link
Member Author

pjenvey commented Oct 8, 2018

I briefly discussed a diesel solution for this in their gitter, I'm not sure they'd take this on but I came to the conclusion it's doable via a mysql named lock (GET_LOCK). they aren't committed during transactions (which implicitly occur for most mysql DDL statements -- and thus why locking the migration table wouldn't work)

@tublitzed tublitzed added this to Backlog in Services Engineering Sep 26, 2019
@tublitzed tublitzed moved this from Backlog: Sync to Backlog: Push in Services Engineering Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p3
Projects
Services Engineering
  
Backlog: Push
Development

No branches or pull requests

1 participant