Skip to content

can't set changelog-lock-wait-time-in-minutes parameter to 0 #331

Closed

Description

Hi,

We are in the case where we want to fail immediately if there is a lock.
For that reason, we have try to set changelog-lock-wait-time-in-minutes to 0 but it does not work with liquibase for mongodb.

The algorithm in AbstractnoSqlLockService is :

  • consider we don't have the lock
  • Loop :
    • If we don't have the lock and the lock-wait-time is not elapsed :
      • try to get the lock
      • wait if it's still no the case

If there is no lock in the database and we don't want to wait, it's impossibleto get the lock.

As a result, there is a LockException raised with the message : Could not acquire change log lock. Currently locked by UNKNOWN

To handle this, i think the algorithm should be based on a do / while which will ensure to try at least one time to get the lock.

If your ok with that, i can submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions