qertoip / transaction_retry

Retries database transaction on deadlock and transaction serialization errors. Supports MySQL, PostgreSQL and SQLite.
MIT License
116 stars 42 forks source link

Why do you require isolation? #4

Open tillvollmer opened 9 years ago

tillvollmer commented 9 years ago

In the init section it uses this TransactionIsolation.apply_activerecord_patch

But there is no call of isolation() in the code.

Why is that needed?

joevandyk commented 6 years ago

I think Rails 4 supports specifying the transaction level.. maybe that could be used?

nevinera commented 5 years ago

That other gem does some exception rewriting, and this one depends on the ActiveRecord::TransactionIsolationConflict exception, rather than the collection of other exceptions it wraps: https://github.com/qertoip/transaction_retry/blob/0cd0491a5ef2a8e1864522bb2760536da039cb55/lib/transaction_retry/active_record/base.rb#L33