1.出现数据库死锁问题原因可能为idea运行时频繁,导致Jar包启动报错,工作流表部分日志表被锁,也可能上次未正常终止程序导致的异常
2023-03-20 14:43:06.599INFO 21208 --- [main] liquibase.lockservice : Waiting for changelog lock....2023-03-20 14:43:16.878INFO 21208 --- [main] liquibase.lockservice : Waiting for changelog lock....2023-03-20 14:43:27.225INFO 21208 --- [main] liquibase.lockservice : Waiting for changelog lock....2023-03-20 14:43:37.628INFO 21208 --- [main] liquibase.lockservice : Waiting for changelog lock....2023-03-20 14:43:48.026INFO 21208 --- [main] liquibase.lockservice : Waiting for changelog lock....2023-03-20 14:43:58.592INFO 21208 --- [main] liquibase.lockservice : Waiting for changelog lock....2023-03-20 14:44:09.105INFO 21208 --- [main] liquibase.lockservice : Waiting for changelog lock....
2.执行下面的第一条语句,查出的数据库中数据的locked的值是1,说明database被锁了,然后在执行第二条修改语句,进行修改
#查询被锁的表SELECT * FROM DATABASECHANGELOGLOCK;#解除锁定UPDATE DATABASECHANGELOGLOCK SET locked=0, lockgranted=null, lockedby=null WHERE id=1
3.如果提示找不到表或试图不存在
解决办法(所有以DATABASECHANGELOGLOCK结尾的表都检查一遍,并修改locked字段的值为0即可)如图所示: