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

fix: stop leaking BackgroundPurges #8650

Merged
merged 6 commits into from
Aug 8, 2024
Merged

Conversation

koivunej
Copy link
Member

@koivunej koivunej commented Aug 8, 2024

avoid "leaking" the completions of BackgroundPurges by:

  1. switching it to TaskTracker for provided close+wait
  2. stop using tokio::fs::remove_dir_all which will consume two units of memory instead of one blocking task

Additionally, use more graceful shutdown in tests which do actually some background cleanup.

avoid "leaking" the completions of BackgroundPurges by:

1. switching it to TaskTracker for provided close+wait
2. stop using tokio::fs::remove_dir_all which will consume two units of
   memory instead of one std::fs::remove_dir_all
@koivunej koivunej requested a review from a team as a code owner August 8, 2024 08:19
pageserver/src/tenant/mgr.rs Outdated Show resolved Hide resolved
pageserver/src/tenant/mgr.rs Show resolved Hide resolved
@koivunej
Copy link
Member Author

koivunej commented Aug 8, 2024

I am not exactly sure which tests touch this, I am hoping some do. Need to check if tenant deletion tests actually shuts down pageserver gracefully.

Copy link

github-actions bot commented Aug 8, 2024

2112 tests run: 2043 passed, 0 failed, 69 skipped (full report)


Code coverage* (full report)

  • functions: 32.5% (7160 of 22003 functions)
  • lines: 50.5% (57860 of 114527 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
731f97e at 2024-08-08T11:02:23.199Z :recycle:

by default we do an immediate shutdown, which is not great if you want
to make sure some cleanup gets to run.
@koivunej koivunej enabled auto-merge (squash) August 8, 2024 10:58
@koivunej koivunej merged commit 8561b2c into main Aug 8, 2024
63 checks passed
@koivunej koivunej deleted the joonas/drain_more_joinsets branch August 8, 2024 11:02
jcsp pushed a commit that referenced this pull request Aug 12, 2024
avoid "leaking" the completions of BackgroundPurges by:

1. switching it to TaskTracker for provided close+wait
2. stop using tokio::fs::remove_dir_all which will consume two units of
memory instead of one blocking task

Additionally, use more graceful shutdown in tests which do actually some
background cleanup.
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