• E
    Make connection handler per thread instead of per fiber · 5ce3e022
    Eileen Uchitelle 提交于
    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]
    5ce3e022
core.rb 20.4 KB