DatabaseUpdater.releaseDatabaseLocks doesn't release database locks after crashes

Description

The DatabaseUpdate.releaseDatabaseLocks method is intended to release database locks set by liquibase in the event of a server crash while the changes are running.

This does not work, and looks like it hasn’t been working since the update to Liquibase 4.x.

This appears to be because “StandardLockService.hasChangeLog()” method, which is simply a property accessor:

… ie, it does not check the underlying the liquibase lock table, like the list locks method does:

The hasChangeLock will only be true if this particular instance of the StandardLockService has taken our a lock, it doesn’t check to see if there are locks taken out by liquibase overall.

Activity

Show:

Mark Goodrich February 21, 2025 at 10:05 PM

Thanks for merging !

Mark Goodrich February 21, 2025 at 2:01 PM

Interesting, and thanks !

Daniel Kayiwa February 21, 2025 at 9:46 AM

The changesets are running more slowly because of a bug in liquibase which was fixed here:

We are just waiting for the next release of liquibase to have it.

Mark Goodrich February 20, 2025 at 9:34 PM

Agreed and thanks ! I do think it’s save to backport to 2.6.x and probably was an issue then as well, just something is making liquibase changesets slower (at least for us) in 2.7, that is making this manifest itself more.

Ian Bacher February 20, 2025 at 9:29 PM
Edited

Fixed

Details

Assignee

Reporter

Priority

Created February 20, 2025 at 8:54 PM
Updated February 21, 2025 at 10:05 PM
Resolved February 21, 2025 at 10:05 PM