rsim / oracle-enhanced

Oracle enhaced adapter for ActiveRecord
MIT License
544 stars 308 forks source link

Add allow_retry kwarg to execute #2366

Closed andynu closed 3 months ago

andynu commented 3 months ago

This extends the existing class level auto_retry functionality to optionally allow an allow_retry boolean kwarg to allow retry of specific queries.

This PR preserves the requirement that autocommit? be enabled which is the safer choice.

  def with_retry(allow_retry: false) # :nodoc:
    should_retry = (allow_retry || self.class.auto_retry?) && autocommit?

See issue #2310

andynu commented 3 months ago

Dup of #2374