If an application crashes (OOM / power failure / kill -9) after liquibase acquired a lock, but before releasing the lock, the lock will remain in the databasechangeloglock
table forever and we'll need to manually remove it.
I wonder if it's possible to force the application with liquibase do this:
I want it to speed up application bootstrap (when there's no new migrations) and reduce chances to get stuck lock in the databasechangeloglock
.
Currently I just create a liquibase.integration.spring.SpringLiquibase
Spring bean. I assume I need to create some custom tricky @ConditionalOn... annotation
Liquibase already does 1 using Fastcheck: here and here. That's something relatively new. But the accepted answer is also good!