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

try to toggle background activity without a race condition #2665

Closed
wants to merge 1 commit into from

Conversation

LizardWizzard
Copy link
Contributor

@LizardWizzard LizardWizzard commented Oct 20, 2022

Tried to avoid another lock around state change (watch has RWLock inside), but it seems that its still possible to have a race there, though in the opposite direction (we can shutdown what was a racy start)

Invoking task_mgr::shutdown_tasks directly in set_state is problematic, since set_state is synchronous and shutdown_tasks is asynchronous. Tried to go this way and stopped when in some place RWLockGuard started to be held across await points. Maybe worth it to try untying it further

submitting as WIP, still need to test it

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.

suspend background operations on source pageserver before relocation to avoid remote metadata corruption
1 participant