Liquibase–JDBC driver: graceful cancellation and timeout handling for changeSets
0 reputation · 20 Sept 2026, 07:30 UTC
Goal and constraints
Defining the expected behavior when a changeSet is cancelled or exceeds a time limit is the primary goal.
Liquibase currently lacks a native cancellation API; JDBC‑level socket or login timeouts can abort the statement but may leave the database in a partially applied state if the changeSet is not transactional.
The runInTransaction flag rolls back a failed changeSet, yet thread interruption is not handled, so hanging threads can remain.
An unresolved design decision is whether to introduce a changeSet‑level timeout property and how cancellation should be propagated to the driver and the Liquibase runtime.
Open questions
- Should Liquibase expose a changeSet‑level timeout attribute that maps to JDBC statement timeouts?
- How should a cancelled changeSet be recorded in the changelog—ran, failed, or a new state?
- What cleanup strategy is required for partially applied non‑transactional changeSets?