Prototype: Automatic lock prolonging and removal of stale locks

Hey there,

automatic lock prolonging (and with this, removal of stale locks) is quite important in microservice environments, especially where developers don’t have access to the production database and hence cannot manually remove locks there.

I started working on https://liquibase.jira.com/browse/CORE-2375 and got a prototype working, however only on an older branch.

I haven’t been able to get the newer branches to work even without modifications, see https://www.zohodiscussions.com/liquibase#Topic/49382000001952005

My solution seems to work so far, only drawback is that I am creating two JDBC connections now, as the prolonging lock service asynchronously prolongs its lock and hence needs its own transaction (it would otherwise rollback or commit changes the actual updater is doing).

The prolonging lock service is not activated by default, but even when its deactivated, and the standard lock service is used, I’m creating two connections.

I’m not sure if that might cause problems in situations where people use a JDBC pool (with size 1). Maybe we should do another check and only create two connections in case the prolonging lock service got activated.

Looking forward to hear your feedback, or get some review comments (see pull request in the ticket).

Best

Bernhard