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

Handle scenarios where registered processes disappear outside regular flow #337

Merged
merged 6 commits into from
Sep 11, 2024

Commits on Sep 11, 2024

  1. Prevent supervisor from pruning itself

    For example, when coming back from being suspended and having its
    heartbeat expired.
    rosa committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    fe2d47f View commit details
    Browse the repository at this point in the history
  2. Move #stop and #stopped? to Processes:Base

    As these are all common between all processes.
    rosa committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    f889818 View commit details
    Browse the repository at this point in the history
  3. Stop runnable processes when registered process record disappears

    If, for some reason, the process failed a heartbeat and the supervisor
    pruned it, we shouldn't continue running. Just stop as if we had
    received a signal.
    
    This could be used in the future from Mission Control to stop a worker.
    rosa committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    fdf463b View commit details
    Browse the repository at this point in the history
  4. Lock the process record before heartbeating

    To guard against race conditions of the record being deleted precisely
    then.
    rosa committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    d58c230 View commit details
    Browse the repository at this point in the history
  5. Fix block for with_lock, that doesn't yield the receiver

    Thanks to @npezza93 for catching this ^_^U
    rosa committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    6d7bc6f View commit details
    Browse the repository at this point in the history
  6. Remove duplicate heartbeat launch for the supervisor

    Left-over from somethign I was rewriting.
    rosa committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    8957e00 View commit details
    Browse the repository at this point in the history