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

pageserver: reduce runtime of init_tenant_mgr #7553

Merged
merged 3 commits into from
Apr 30, 2024
Merged

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Apr 30, 2024

Problem

init_tenant_mgr blocks the rest of pageserver startup, including starting the admin API.

This was noticeable in #7475 , where the init_tenant_mgr runtime could be long enough to trip the controller's 30 second heartbeat timeout.

Summary of changes

  • When detaching tenants during startup, spawn the background deletes as background tasks instead of doing them inline
  • Write all configs before spawning any tenants, so that the config writes aren't fighting tenants for system resources
  • Write configs with some concurrency (16) rather than writing them all sequentially.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
  • If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.

Checklist before merging

  • Do not forget to reformat commit message to not include the above checklist

@jcsp jcsp added c/storage/pageserver Component: storage: pageserver a/tech_debt Area: related to tech debt labels Apr 30, 2024
Copy link

2850 tests run: 2729 passed, 0 failed, 121 skipped (full report)


Code coverage* (full report)

  • functions: 28.2% (6573 of 23345 functions)
  • lines: 46.9% (46723 of 99667 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
047d9a2 at 2024-04-30T09:33:24.463Z :recycle:

@jcsp jcsp marked this pull request as ready for review April 30, 2024 10:05
@jcsp jcsp requested a review from a team as a code owner April 30, 2024 10:05
@jcsp jcsp requested a review from arssher April 30, 2024 10:05
@jcsp jcsp merged commit eb53345 into main Apr 30, 2024
57 checks passed
@jcsp jcsp deleted the jcsp/faster-init-mgr branch April 30, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt c/storage/pageserver Component: storage: pageserver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants