Skip to content

Commit

Permalink
Reduce blocking in approle tidy by grabbing only one lock at a time. (#…
Browse files Browse the repository at this point in the history
…8418) (#8460)

Revamp race test to make it aware of when tidies start/stop, and to generate dangling accessors that need cleaning up.  Also run for longer but with slightly less concurrency to ensure the writes and the cleanup actually overlap.
  • Loading branch information
ncabatoff authored Mar 4, 2020
1 parent 528d04e commit 03a6da7
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 170 deletions.
3 changes: 0 additions & 3 deletions builtin/credential/approle/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package approle
import (
"context"
"sync"
"time"

"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/consts"
Expand Down Expand Up @@ -57,8 +56,6 @@ type backend struct {
// secretIDListingLock is a dedicated lock for listing SecretIDAccessors
// for all the SecretIDs issued against an approle
secretIDListingLock sync.RWMutex

testTidyDelay time.Duration
}

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error) {
Expand Down
Loading

0 comments on commit 03a6da7

Please sign in to comment.