call after_rollback() before accounting state is reset?

Issue #3934 resolved
Mike Bayer repo owner created an issue

The after_commit() handler is called before the snapshot is removed. It's not clear why the after_rollback() handler is called after the snapshot is removed. It is useful for applications to have access to the state of the objects in this event. There's also no test coverage asserting that snapshot is present for after_commit().

Comments (2)

  1. Mike Bayer reporter

    Emit after_rollback() event before snapshot removal

    The state of the :class:.Session is now present when the :meth:.SessionEvents.after_rollback event is emitted, that is, the attribute state of objects prior to their being expired. This is now consistent with the behavior of the :meth:.SessionEvents.after_commit event which also emits before the attribute state of objects is expired.

    Change-Id: I9c572656ec5a9bfaeab817e9c95107c75aca1b51 Fixes: #3934

    → <<cset 4ece86eb4127>>

  2. Log in to comment