Skip to content
Snippets Groups Projects
Unverified Commit 6f4a343a authored by Daniel Higginbotham's avatar Daniel Higginbotham Committed by GitHub
Browse files

bandaid to resolve #10651 (#10718)

When multiple instances run migrations race conditions are encountered that result in exceptions getting thrown. We try to mitigate this using auto-retry. The code in this PR is one more instance where a race condition can cause an exception, and it gets mitigated with an auto-retry.
parent 127b7eb8
No related branches found
No related tags found
No related merge requests found
......@@ -211,10 +211,9 @@
(if (has-unrun-migrations? liquibase)
(do
(log/info (trs "Migration lock is cleared. Running migrations..."))
(let [^Contexts contexts nil]
(.update liquibase contexts)))
(u/auto-retry 3 (let [^Contexts contexts nil] (.update liquibase contexts))))
(log/info
(trs "Migration lock cleared, but nothing to do here! Migrations were finished by another instance.")))))
(trs "Migration lock cleared, but nothing to do here! Migrations were finished by another instance.")))))
(defn- force-migrate-up-if-needed!
"Force migrating up. This does two things differently from `migrate-up-if-needed!`:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment