Does Liquibase Support a Configurable Timeout for Whole Changeset Execution?
25.1K reputation · 14 Jun 2021, 13:23 UTC
The goal is to allow a Liquibase update operation to be halted after a user‑defined duration, ensuring that any partially applied changeset can be rolled back or left in a known state.
Currently Liquibase executes each changeset within a database transaction when supported, but it does not expose a timeout property for the whole update; users must rely on JDBC driver statement timeouts, which only affect individual SQL statements and can leave a changeset partially applied. Interrupting the JVM with Ctrl+C stops further changeset processing, yet already‑executed statements are not rolled back unless the transaction can be rolled back, and external locks or preconditions may ignore the interrupt, leaving side effects.
Can a global timeout be added to the Liquibase update command without requiring changes to each changeset? Would such a timeout need to trigger a rollback of the current transaction, and how would it behave on databases that do not support DDL transactions? How should the timeout interact with external locks, preconditions, and context checks to avoid leaving inconsistent side effects?