Liquibase changeLogLock

My application using Flowable 6.4.1 crashed, when restarted it hung in a liquibase lock:

2019-06-05 11:29:37,266 INFO  [main] liquibase.logging.core.Slf4jLogger: SELECT COUNT(*) 
FROM public.act_dmn_databasechangeloglock
2019-06-05 11:29:37,268 INFO  [main] liquibase.logging.core.Slf4jLogger: SELECT COUNT(*) FROM public.act_dmn_databasechangeloglock
2019-06-05 11:29:37,269 INFO  [main] liquibase.logging.core.Slf4jLogger: SELECT LOCKED FROM public.act_dmn_databasechangeloglock WHERE ID=1
2019-06-05 11:29:37,270 INFO  [main] liquibase.logging.core.Slf4jLogger: Waiting for changelog lock....

I tried to set the locks to “false” in a spring boot data initializer but that didn’t seem to work. System ops don’t want to take the application in production with this lock issue. How do I set the locks to false at startup of my application? Or should I do that?

Hi Christine.
The locks can be released manually:

UPDATE <tableName> (e.g. DATABASECHANGELOGLOCK) SET LOCKED=FALSE, LOCKGRANTED=null, LOCKEDBY=null where ID=1;

(Clear the locks only if there is no upgrade running). The question is why Flowable crashed.

Regards
Martin

Hey Christine,

I would strongly advise not to do this. The locks are there in order to be able to start multiple instances of Flowable in the same time and to prevent both of them doing the same DB table updates.

Going into such a lock usually means that Flowable crashed during the startup of the application and failed to unlock the tables. This can happen if someone force killed the application during the startup.

Cheers,
Filip