secret/database: fix bug where too many wal deletes are deferred (#16686)
* secret/database: fix bug where too many wal deletes are deferred * changelog * Update changelog/16686.txt Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com> Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>
This commit is contained in:
parent
eed4bdb050
commit
c97b982043
|
@ -537,7 +537,7 @@ func (b *databaseBackend) initQueue(ctx context.Context, conf *logical.BackendCo
|
|||
}
|
||||
|
||||
walID, err := framework.PutWAL(ctx, conf.StorageView, staticWALKey, &setCredentialsWAL{RoleName: "vault-readonlytest"})
|
||||
if walID != "" {
|
||||
if walID != "" && err == nil {
|
||||
defer framework.DeleteWAL(ctx, conf.StorageView, walID)
|
||||
}
|
||||
switch {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
secrets/database: Fix a bug where the secret engine would queue up a lot of WAL deletes during startup.
|
||||
```
|
Loading…
Reference in New Issue