ChangelogBehavior Leaves Transaction Open on Failed Save

XMLWordPrintable

      ChangelogBehavior begins a transaction in beforeSave and commits it in afterSave, unless there is an error in one of those callbacks, in which case a rollback is issued. However, if the main save fails for some reason (such as a validation error as thrown by CO-2828), afterSave is not called and the transaction is not closed.

      Under most circumstances this isn't really a problem since web transactions will simply exit, however for longer lived processes (and specifically Job Shell) this can create problems. In the case of Job Shell, the lock is not released at the end of the process because the open transaction causes a rollback when the process exits.

            Assignee:
            Benn Oshrin
            Reporter:
            Benn Oshrin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: