Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: Add controller RPC for notifying about domain failure
Add a controller RPC that a worker can use to notify the controller that only one of the domain replicas running on that worker has failed. This: 1. Removes the domain replica's worker assignment from the df state 2. Kills all downstream domains of that replica (without regard for replica index - which is fine for now since we only fan-out replicas at reader domains, but for efficiency's sake should be fixed to track replica fanout once we allow replicating internal and/or base domains) 3. Runs recovery (in the background!) to try to re-place the failed and killed domains. That background recovery process uses a new, somewhat general mechanism in the controller for notifying about background task failure - this could hypothetically be reused elsewhere for more fallible controller-related background tasks Note that this whole thing is *quite* deadlock-prone without running the entire process (most notably the acquisition of the dataflow state handle's writer lock) in the background: since lots of things in the controller hold on to the dataflow state handle's write lock while blocking on requests to workers, we need to make sure that we're *never* holding the dataflow state handle's writer lock while the worker is waiting on a request *to the controller* (eg in the other direction). Refs: REA-3186 Change-Id: I6527a94a3b93dfe324e27ac29e8ac1fb011abd17 Reviewed-on: https://gerrit.readyset.name/c/readyset/+/5642 Reviewed-by: Luke Osborne <luke@readyset.io> Reviewed-by: Dan Wilbanks <dan@readyset.io> Tested-by: Buildkite CI
- Loading branch information
1 parent
569d1a2
commit 30490ac
Showing
3 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
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
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
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