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

retry db migrations #1791

Merged
merged 1 commit into from Mar 4, 2024
Merged

retry db migrations #1791

merged 1 commit into from Mar 4, 2024

Conversation

TBonnin
Copy link
Collaborator

@TBonnin TBonnin commented Mar 4, 2024

In case multiple instances of server are trying to run migration at startup, knex lock mechanism can lead to one of the instance migration to fail and therefore fail to deploy.
In order to avoid failed migration because of lock, we wait and retry migrations

Checklist before requesting a review (skip if just adding/editing APIs & templates)

  • I added tests, otherwise the reason is:
  • I added observability, otherwise the reason is:
  • I added analytics, otherwise the reason is:

@TBonnin TBonnin force-pushed the tbonnin/retry-migration branch 2 times, most recently from 0456f52 to be64e13 Compare March 4, 2024 11:32
In case multiple instances of server are trying to run migration at
startup, knex lock mechanism can lead to one of the instance migration
to fail and therefore fail to deploy.
In order to avoid failed migration because of lock, we wait and retry
migrations
Copy link
Contributor

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this 👌🏻

@TBonnin TBonnin merged commit 441af52 into master Mar 4, 2024
20 checks passed
@TBonnin TBonnin deleted the tbonnin/retry-migration branch March 4, 2024 13:00
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.

None yet

3 participants