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

Ensure that fewer goroutines survive after a test completes #14197

Merged
merged 8 commits into from
Feb 23, 2022

Conversation

ncabatoff
Copy link
Collaborator

  • add Core.ShutdownWait that doesn't return until shutdown is done
  • create the usedCodes cache on seal and nil it out on pre-seal so that the finalizer kills the janitor goroutine
  • stop seal health check when sealing rather than wait for it to discover the active context is done
  • make sure all lease-loading goroutines are done before returning from restore
  • make uniquePoliciesGc discover closed quitCh immediately instead of only when the ticker fires
  • make sure all loading goroutines are done before returning from loadEntities, loadCachedEntitiesOfLocalAliases

…a test completes:

* add Core.ShutdownWait that doesn't return until shutdown is done
* create the usedCodes cache on seal and nil it out on pre-seal so that the finalizer kills the janitor goroutine
* stop seal health checks on seal rather than wait for them to discover the active context is done
* make sure all lease-loading goroutines are done before returning from restore
* make uniquePoliciesGc discover closed quitCh immediately instead of only when the ticker fires
* make sure all loading goroutines are done before returning from loadEntities, loadCachedEntitiesOfLocalAliases
@ncabatoff ncabatoff requested a review from sgmiller February 22, 2022 18:46
Copy link
Collaborator

@sgmiller sgmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The autoseal cleanup lgtm!

@vercel vercel bot temporarily deployed to Preview – vault-storybook February 22, 2022 21:32 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 22, 2022 21:32 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 22, 2022 22:18 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 22, 2022 22:18 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 22, 2022 22:21 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 22, 2022 22:21 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 23, 2022 15:00 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 23, 2022 15:00 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 23, 2022 15:09 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 23, 2022 15:09 Inactive
@ncabatoff ncabatoff merged commit 3ff381a into main Feb 23, 2022
@ncabatoff ncabatoff deleted the improve-goroutine-termination-in-tests branch February 23, 2022 15:33
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.

3 participants