-
Notifications
You must be signed in to change notification settings - Fork 445
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
refactor(pageserver) remove task_mgr
for most global tasks
#8449
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3144 tests run: 3023 passed, 0 failed, 121 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
fbf320b at 2024-07-22T11:35:20.953Z :recycle: |
problame
force-pushed
the
problame/less-task-mgr
branch
from
July 21, 2024 15:59
4d8ddce
to
195a7ab
Compare
Closed
koivunej
reviewed
Jul 22, 2024
koivunej
reviewed
Jul 22, 2024
koivunej
reviewed
Jul 22, 2024
koivunej
approved these changes
Jul 22, 2024
jcsp
reviewed
Jul 22, 2024
jcsp
approved these changes
Jul 22, 2024
koivunej
approved these changes
Jul 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation & Context
We want to move away from
task_mgr
towards explicit tracking of child tasks.This PR is extracted from #8339 where I refactor
PageRequestHandler
to not depend on task_mgr anymore.Changes
This PR refactors all global tasks but
PageRequestHandler
to use some combination ofJoinHandle
/JoinSet
+CancellationToken
.The
task_mgr::spawn(.., shutdown_process_on_error)
functionality is preserved through the newexit_on_panic_or_error
wrapper.Some global tasks were not using it before, but as of this PR, they are.
The rationale is that all global tasks are relevant for correct operation of the overall Neon system in one way or another.
Future Work
After #8339, we can make
task_mgr::spawn
require aTenantId
instead of anOption<TenantId>
which concludes this step of cleanup work and will help discourage future usage of task_mgr for global tasks.Notes for Reviewers
The individual commits are mostly orthogonal but it's too painful to stack them in a series of PRs.
I would recommend reviewing commit-by-commit.