Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop checking for Process.pid and trust the fork decorators #41850

Closed
wants to merge 1 commit into from

Commits on Apr 6, 2021

  1. Stop checking for Process.pid and trust the fork decorators

    `Process.pid` is not cached on Linux and is surprisingly
    expensive. These checks are in hotspots, the the cost is not
    negligible.
    
    In rails#37296 (comment)
    we established that it's pretty much impossible to bypass
    `Process.fork` / `Kernel#fork`.
    
    We still added the checks to protect against user defined
    `after_fork` hooks that would use the connection. But
    I don't think the cost is worth this extra safety.
    byroot committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    930efcd View commit details
    Browse the repository at this point in the history