Please sign in to comment.
Clear the correct query cache
This executor currently relies on `ActiveRecord::Base.connection` not changing between `prepare` and `complete`. If something else returns the current ActiveRecord connection to the pool early then this `complete` call will fail to clear the correct query cache and restore the original `query_cache_enabled` status. This has for example been happening in Sidekiq: mperham/sidekiq#3166 We can just keep track of the connection as part of the exector state.
- Loading branch information...
Showing with 27 additions and 4 deletions.