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

Protect schema migrations from running in parallel #199

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

eikek
Copy link
Member

@eikek eikek commented Sep 6, 2024

No description provided.

@eikek eikek added the chore Maintenance work label Sep 6, 2024
@eikek eikek force-pushed the improve-schema-migration branch from f5b4843 to 628e04d Compare September 6, 2024 11:47
For code that should not run in parallel when multiple deployments are
active, synchronisation must happen outside the app. For this SOLR can
be used, utilising it's optimistic locking feature. Based on this, a
`Resource` is provided to be able to run code sequentially.
Re-indexing must not run in parallel, so it was protected by inserting
something into solr. Now this can be replaced with the
`DocumentLockResource`.
Running schema migrations must not happen in parallel, should there be
multiple instance deployed. It is now protected using the
`DocumentLockResource`.

Since this changes the version-document used to track the current
schema version, this document must now be converted as a first step to
make it up to date on existing deployments.
@eikek eikek force-pushed the improve-schema-migration branch from 628e04d to 89a1c36 Compare September 6, 2024 11:57
@eikek eikek changed the title Improve schema migration Protect schema migrations from running in parallel Sep 6, 2024
@eikek eikek marked this pull request as ready for review September 6, 2024 12:18
@eikek eikek merged commit 21f7748 into development Sep 6, 2024
3 checks passed
@eikek eikek deleted the improve-schema-migration branch September 6, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant