是否有liquibase锁定超时? [英] Is there a liquibase lock timeout?

查看:75
本文介绍了是否有liquibase锁定超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以在此问题中看到:( liquibase-lock-reasons )当Liquibase操作被中断时,客户端Liquibase锁定,从而使liquibase处于锁定状态.

You can see in the issue here: (liquibase-lock-reasons) at situation where the client Liquibase locks when a Liquibase operation has been interrupted, leaving liquibase in a locked state.

我想知道是否有一种方法可以配置Liquibase从 LOCKGRANTED 列中的日期和时间自动检测这种情况.我认为,如果您已将锁保持一个小时,则应将其称为过期的锁.

I'm wondering if there is a way to configure Liquibase to automatically detect this situation from the date and time in the LOCKGRANTED column. I think if you've held onto the lock for an hour - you should call that an expired lock.

我的问题是:是否有liquibase锁定超时?

推荐答案

没有锁定超时.Liquibase不知道期望changeSet花费多长时间,如果某些人正在大型表上进行DML,则它们可能需要数小时才能成功运行.

There is no lock timeout. Liquibase has no idea of how long to expect changeSets to take, and if some are doing DML on large tables they can take hours to run successfully.

有一个releaseLocks命令,可用于手动清除锁,也可以将liquibase.lockservice.StandardLockService子类化,以在设置的时间段后添加其他逻辑来覆盖锁.

There is a releaseLocks command you can use to clear the locks manually, or you could subclass liquibase.lockservice.StandardLockService to add additional logic to override the lock after after a set period of time.

如果只有一台机器将更新数据库,则可以考虑 https://github.com/liquibase/liquibase-nochangeloglock ,也完全禁用了锁支持.

If you have only one machine that would be updating the database, you can consider https://github.com/liquibase/liquibase-nochangeloglock as well, which completely disables the lock support.

我认为它是可配置的有用功能,因此我确实添加了 https://liquibase.jira.com/browse/CORE-2375 来跟踪功能.

I could see it as being a useful feature to have configurable, so I did add https://liquibase.jira.com/browse/CORE-2375 to track the feature.

这篇关于是否有liquibase锁定超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆