diff options
author | Eileen Uchitelle <eileencodes@gmail.com> | 2018-11-20 13:57:25 -0500 |
---|---|---|
committer | Eileen Uchitelle <eileencodes@gmail.com> | 2018-11-20 16:02:40 -0500 |
commit | 5ce3e022ef136324d288fb493e0938e76a74981a (patch) | |
tree | 5f27b53bc3068cc12765d2df7969ec3f3594cd24 /.gitignore | |
parent | 023a840f5f10c5a611a0618ff8ea9e16cd771f93 (diff) | |
download | rails-5ce3e022ef136324d288fb493e0938e76a74981a.tar.gz rails-5ce3e022ef136324d288fb493e0938e76a74981a.tar.bz2 rails-5ce3e022ef136324d288fb493e0938e76a74981a.zip |
Make connection handler per thread instead of per fiber
The connection handler was using the RuntimeRegistry which kind of
implies it's a per thread registry. But it's actually per fiber.
If you have an application that uses fibers and you're using multiple
databases, when you switch the connection handler to swap connections
new fibers running on the same thread used to get a different connection
id. This PR changes the code to actually use a thread so that we get
the same connection.
Fixes https://github.com/rails/rails/issues/30047
[Eileen M. Uchitelle, Aaron Patterson, & Arthur Neeves]
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions