marlNextChangeSetRan and failed ChangeSet

Hello,

From what I have experimented with Liquibase:

  • When a ChangeSet execution ends in error, the row is not inserted in the CHANGELOG table
  • When I run markNextChangeSetRan it takes the first not ran ChangeSet and insert it into the CHANGELOG table no matter it was ran (and failed) or not
This can raise problems: after a ChangeSet execution failure, I run it manually (needed local patch), and run markNextChangeSetRan twice. In this scenario, the second markNextChangeSetRan execution was a mistake, the following ChangeSet has been inserted in the CHANGELOG without being run at all. In the end this markNextChangeSetRan operation is tricky because you need to know where Liquibase stopped last time.

Inserting a failed ChangeSet in the CHANGELOG table would allow a “markFailedChangedSetRan” to do something only if such a row exists.

What is the purpose of this markNextChangeSetRan operation?

Gérald