I have spring boot application which have defined database migrations using liquibase.
When I start application script wait 500s and check http status of application. When it returns error code script kills application process and try to start application again.
Application is killed during starting sometimes and liquibase don't remove records from databasechangeloglock
. When application runs next time it wait for release lock, but it doesn't happen and application is killed again and again.
In logs last lines from each application are:
liquibase : Waiting for changelog lock....
liquibase : Waiting for changelog lock....
Do you have any ideas how to solve this problem inside script?
Liquibase changes are controlled by 2 tables, which will be in the schema that is being altered:
1) databasechangeloglock_table
2) databasechangelog_table
Your changes are not running because the databasechangeloglock table has the LOCKED column set. You can manually unset this before you start the server/application again.
BE VERY CAREFUL WHICH CHANGESETS HAVE RUN BEFORE YOU DO THIS
If you are sure a change set has not run you can delete the relavent row from both change log tables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With