5fbaa524b9
Fix: https://github.com/rails/rails/issues/45017 Ref: https://github.com/rails/rails/pull/29333 Ref: https://github.com/ruby/timeout/pull/30 Historically only raised errors would trigger a rollback, but in Ruby `2.3`, the `timeout` library started using `throw` to interupt execution which had the adverse effect of committing open transactions. To solve this, in Active Record 6.1 the behavior was changed to instead rollback the transaction as it was safer than to potentially commit an incomplete transaction. Using `return`, `break` or `throw` inside a `transaction` block was essentially deprecated from Rails 6.1 onwards. However with the release of `timeout 0.4.0`, `Timeout.timeout` now raises an error again, and Active Record is able to return to its original, less surprising, behavior. |
||
---|---|---|
.. | ||
minitest | ||
rails | ||
rails.rb |