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

cluster: fix race condition setting suicide prop #4349

Closed
wants to merge 1 commit into from

Commits on Jan 13, 2016

  1. cluster: fix race condition setting suicide prop

    There is no guarantee that the `suicide` property of a worker in the
    master process is going to be set when the `disconnect` and `exit`
    events are emitted.
    To fix it, wait for the ACK of the suicide message from the master
    before disconnecting the worker. Also, there's no need to send the
    suicide message from the worker if the disconnection has been
    initiated in the master.
    Add `test-cluster-disconnect-suicide-race` that forks a lot of workers
    to consistently reproduce the issue this patch tries to solve.
    Modify `test-regress-nodejsGH-3238` so it checks both the `kill` and
    `disconnect` cases. Also take into account that the `disconnect` event
    may be received after the `exit` event.
    santigimeno committed Jan 13, 2016
    Configuration menu
    Copy the full SHA
    0fb3ec9 View commit details
    Browse the repository at this point in the history