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

Implement database locking in the migration engine #1118

Closed
tomhoule opened this issue Sep 11, 2020 · 0 comments · Fixed by #1479
Closed

Implement database locking in the migration engine #1118

tomhoule opened this issue Sep 11, 2020 · 0 comments · Fixed by #1479
Assignees
Labels
domain/schema tech/engines/migration engine Issue in the Migration Engine tech/engines Issue for tech Engines.
Milestone

Comments

@tomhoule
Copy link
Contributor

tomhoule commented Sep 11, 2020

We should make sure that migrations are not running concurrently.

This is implemented by other migration systems, and we can copy the best practices from them.

  • pg_advisory_lock on postgres (sqlx)
  • GET LOCK on MySQL (sqlx)
  • sqlite can only have a single writer, so we don't need to do anything special
  • Application locks on MSSQL (DBA stackexchange)

It would be good to take a look at other migration systems, like activerecord, to find out if there is consensus on locking best practices.

Related issues:

@tomhoule tomhoule added process/candidate tech/engines/migration engine Issue in the Migration Engine tech/engines Issue for tech Engines. labels Sep 11, 2020
@tomhoule tomhoule self-assigned this Oct 14, 2020
@albertoperdomo albertoperdomo added this to the 2.14.0 milestone Dec 9, 2020
tomhoule added a commit that referenced this issue Dec 21, 2020
tomhoule added a commit that referenced this issue Dec 23, 2020
tomhoule added a commit that referenced this issue Jan 4, 2021
tomhoule added a commit that referenced this issue Jan 4, 2021
@albertoperdomo albertoperdomo modified the milestones: 2.14.0, 2.15.0 Jan 7, 2021
tomhoule added a commit that referenced this issue Jan 11, 2021
tomhoule added a commit that referenced this issue Jan 20, 2021
@albertoperdomo albertoperdomo modified the milestones: 2.15.0, 2.16.0 Jan 21, 2021
@albertoperdomo albertoperdomo removed this from the 2.16.0 milestone Feb 3, 2021
@albertoperdomo albertoperdomo added this to the 2.17.0 milestone Feb 3, 2021
tomhoule added a commit that referenced this issue Feb 5, 2021
tomhoule added a commit that referenced this issue Feb 8, 2021
This prevents multiple migration engines to concurrently update a
database, like other migration tools do.

closes #1118
tomhoule added a commit that referenced this issue Feb 8, 2021
This prevents multiple migration engines to concurrently update a
database, like other migration tools do.

closes #1118
tomhoule added a commit that referenced this issue Feb 8, 2021
This prevents multiple migration engines to concurrently update a
database, like other migration tools do.

closes #1118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain/schema tech/engines/migration engine Issue in the Migration Engine tech/engines Issue for tech Engines.
Projects
None yet
3 participants