Skip to content

Commit

Permalink
Merge remote-tracking branch 'oss/fix-rollback-locks' into fix-rollba…
Browse files Browse the repository at this point in the history
…ck-locks
  • Loading branch information
Brian Kassouf committed Mar 18, 2019
2 parents f736590 + 73e35eb commit 9b7fdf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vault/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type rollbackState struct {
rollbackFunc func(context.Context) error
}

// Run the rollback once, retrun true if we were the one that ran it. Caller
// Run the rollback once, return true if we were the one that ran it. Caller
// should hold the statelock.
func (rs *rollbackState) run(ctx context.Context) (ran bool, err error) {
rs.once.Do(func() {
Expand Down Expand Up @@ -250,7 +250,7 @@ func (m *RollbackManager) Rollback(ctx context.Context, path string) error {
// Check for an existing attempt or start one if none
rs := m.startOrLookupRollback(ctx, fullPath, false)

// Do a run here in the event an allready inflight rollback is blocked on
// Do a run here in the event an already inflight rollback is blocked on
// grabbing the statelock. This prevents a deadlock in some cases where the
// caller of this function holds the write statelock.
ran, err := rs.run(ctx)
Expand Down

0 comments on commit 9b7fdf3

Please sign in to comment.