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

Run job deregistering in a single transaction #4861

Merged
merged 2 commits into from
Nov 13, 2018

Commits on Nov 10, 2018

  1. Run job deregistering in a single transaction

    Fixes #4299
    
    Upon investigating this case further, we determined the issue to be a race between applying `JobBatchDeregisterRequest` fsm operation and processing job-deregister evals.
    
    Processing job-deregister evals should wait until the FSM log message finishes applying, by using the snapshot index.  However, with `JobBatchDeregister`, any single individual job deregistering was applied accidentally incremented the snapshot index and resulted into processing job-deregister evals.  When a Nomad server receives an eval for a job in the batch that is yet to be deleted, we accidentally re-run it depending on the state of allocation.
    
    This change ensures that we delete deregister all of the jobs and inserts all evals in a single transactions, thus blocking processing related evals until deregistering complete.
    Mahmood Ali committed Nov 10, 2018
    Configuration menu
    Copy the full SHA
    7548800 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2018

  1. Comment public functions and batch write txn

    Mahmood Ali committed Nov 12, 2018
    Configuration menu
    Copy the full SHA
    9405473 View commit details
    Browse the repository at this point in the history