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

Backport of secret/database: fix bug where too many wal deletes are deferred into release/1.10.x #16693

Merged

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #16686 to be assessed for backporting due to the inclusion of the label backport/1.10.x.

The below text is copied from the body of the original PR.


This fixes a small bug in the initQueue function where a WAL write test is performed prior to starting the database secret engine caused a lot of delete wal calls to be queued.

When Vault is starting up, it's storage is in read only, so writes will produce an error. The current code checks if a WAL ID is returned after calling PutWal, but this function always returns a WAL ID so it defers a delete call. Since an error is also returned, it then loops and tries again. If start up is taking an excessive amount of time, this bug will queue up a delete wal every 10ms until Vault's storage accepts writes. This is amplified if you have many database secret engines.


Overview of commits

@jasonodonnell jasonodonnell enabled auto-merge (squash) August 11, 2022 20:34
@jasonodonnell jasonodonnell merged commit 1c9684f into release/1.10.x Aug 11, 2022
@jasonodonnell jasonodonnell deleted the backport/wal-delete-bug/lightly-helped-buzzard branch August 11, 2022 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants