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

lock timeouts #13262

Merged
merged 12 commits into from
Apr 4, 2017
Merged

lock timeouts #13262

merged 12 commits into from
Apr 4, 2017

Commits on Apr 1, 2017

  1. All states are lockers

    Since moving to the new backends, all states (except InmemState) are
    Lockers. Add the methods to the State interface to remove a heap of
    assertion checks.
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    bf6384a View commit details
    Browse the repository at this point in the history
  2. remove extra state.Locker assertions

    All states are lockers, so get rid of extra asertions.
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    75458a1 View commit details
    Browse the repository at this point in the history
  3. add state.LockWithContext

    LockWithContext will retry a lock until the context expires or is
    cancelled. This will let us implement a `-lock-timeout` flag, and make
    use of existing contexts when applicable.
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    826771a View commit details
    Browse the repository at this point in the history
  4. Have the clistate Lock use LockWithContext

    - Have the ui Lock helper use state.LockWithContext.
    - Rename the message package to clistate, since that's how it's imported
      everywhere.
    - Use a more idiomatic placement of the Context in the LockWithContext
      args.
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    3f0dcd1 View commit details
    Browse the repository at this point in the history
  5. provide contexts to clistate.Lock calls

    Add fields required to create an appropriate context for all calls to
    clistate.Lock.
    
    Add missing checks for Meta.stateLock, where we would attempt to lock,
    even if locking should be skipped.
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    305ef43 View commit details
    Browse the repository at this point in the history
  6. move force-unlock to plumbing

    shouldn't be listed as a common command
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    9e9d0b1 View commit details
    Browse the repository at this point in the history
  7. add cli flags for -lock-timeout

    Add the -lock-timeout flag to the appropriate commands.
    Add the -lock flag to `init` and `import` which were missing it.
    Set both stateLock and stateLockTimeout in Meta.flagsSet, and remove the
    extra references for clarity.
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    5eca913 View commit details
    Browse the repository at this point in the history
  8. give LockWithContext a little backoff

    Backoff the Lock calls exponentially, to a reasonable limit.
    jbardin committed Apr 1, 2017
    Configuration menu
    Copy the full SHA
    93b1dd6 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2017

  1. test LockWithContext

    jbardin committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    d1460d8 View commit details
    Browse the repository at this point in the history
  2. test -lock-timeout from cli

    jbardin committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    3d60485 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    af2e289 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2017

  1. update command docs

    jbardin committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    7cfb515 View commit details
    Browse the repository at this point in the history