mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
091dc78f94
It is not uncommon for `sql.active_record` subscribers to rely on thread local or fiber local state. For instance the `buffered-logger` gem buffer the logs in a thread variable. With the introduction of async queries, the `sql.active_record` events can now be produced from a background thread and that break some expectations. This makes it hard for subscriber to map the event to the request or job that scheduled it. That is why I believe we should instead store the event and publish it back on the calling thread when the results are accessed. |
||
---|---|---|
.. | ||
fanout.rb | ||
instrumenter.rb |