From 5a41b826171c7d2a8412fa833377ab1df25ee8ec Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Mon, 2 Dec 2024 16:12:39 -0500 Subject: [PATCH] Skip jobs when reinitializing to `Faulted` (#1583) Fixes #1579 (hopefully) --- upstairs/src/downstairs.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/upstairs/src/downstairs.rs b/upstairs/src/downstairs.rs index a50a8ce85..e03ebadab 100644 --- a/upstairs/src/downstairs.rs +++ b/upstairs/src/downstairs.rs @@ -654,7 +654,14 @@ impl Downstairs { // Specifically, we want to skip jobs if the only path back online for // that client goes through live-repair; if that client can come back // through replay, then the jobs must remain live. - if matches!(self.clients[client_id].state(), DsState::LiveRepair) { + let client_state = self.clients[client_id].state(); + if matches!( + client_state, + DsState::LiveRepair | DsState::LiveRepairReady + ) || matches!( + client_state, + DsState::Active | DsState::Offline if !self.can_replay + ) { self.skip_all_jobs(client_id); }