VAULT-8630 Fix goroutine leak from RLQ initialize #17281
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We current have a goroutine leak since as part of creating RLQs, we create a goroutine as part of
memorystore.New
- however, as part ofReset
, we don’t actually callClose
on it. As a result, upon seal/unseal, a lot of these goroutines get stranded.This could cause an issue with a combination of high leadership changes and high quotas.
I tested this manually and this definitely fixes things. Adding a non-manual test doesn't seem particularly easy/possible due to our existing leaks.