Please sign in to comment.
When an exception is caused during a 'release_savepoint' call, after …
…handling the error, activerecord re-raises so outer code has a chance to see the error. However, active_callback was acting as a sink, catching exceptions and not re-throwing to prevent active record from triggering a rollback on an already committed savepoint. This submission makes an attempt to save commit progress in a non-transient manner, so exceptions can be passed to active record while allowing rollbacks to be skipped if a savepoint has already been released. The immediate benefit are unit/functional tests properly reporting errors that occur during after_commit callbacks triggered during a release_savepoint call.
- Loading branch information...
Showing with 22 additions and 12 deletions.