Add a comment around why we are grabbing a lock to update an atomic boolean (#19087)
This commit is contained in:
parent
b6c5d07c5e
commit
720ab09feb
|
@ -416,6 +416,12 @@ func (b *backend) updatePkiStorageVersion(ctx context.Context, grabIssuersLock b
|
|||
return
|
||||
}
|
||||
|
||||
// If this method is called outside the initialize function, like say an
|
||||
// invalidate func on a performance replica cluster, we should be grabbing
|
||||
// the issuers lock to offer a consistent view of the storage version while
|
||||
// other events are processing things. Its unknown what might happen during
|
||||
// a single event if one part thinks we are in legacy mode, and then later
|
||||
// on we aren't.
|
||||
if grabIssuersLock {
|
||||
b.issuersLock.Lock()
|
||||
defer b.issuersLock.Unlock()
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
secrets/pki: Revert fix for PR [18938](https://github.com/hashicorp/vault/pull/18938)
|
||||
```
|
Loading…
Reference in New Issue