mark_entry_failed should possibly rollback session
|Reported by:||Elrond||Owned by:|
|Cc:||Christopher Allan Webber||Parent Tickets:|
mark_entry_failed is often called after an exception.
This exception might be an sql exception (it shouldn't, but well, it happens). After an sql exception the session is in a broken state and mark_entry_failed can't do its job and mark the entry failed: If a session is broken, one can't use it for anything, until one cleans it up using
So the suggestion is to call
- If the session is clean: fine.
- If the session is broken: better clean it up instead of having a exception on an exception (harder to read).
- If someone missed to
.save()something, oh well, their fault.