Skip to content

Commit

Permalink
More panic paths in should_send
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Dec 11, 2024
1 parent c2f28c7 commit 3eb259f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions upstairs/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,10 +923,12 @@ impl DownstairsClient {
DsState::Faulted
| DsState::Replaced
| DsState::LiveRepairReady
| DsState::Stopping(..) => EnqueueResult::Skip,
// XXX there are some `Stopping` cases which should never happen,
// should we panic on them (like we do for negotiation states
// below)?
| DsState::Stopping(
ClientStopReason::Fault(..)
| ClientStopReason::Disabled
| ClientStopReason::Replacing
| ClientStopReason::NegotiationFailed(..),
) => EnqueueResult::Skip,

// We conditionally send jobs if we're in live-repair, depending on
// the current extent.
Expand Down Expand Up @@ -955,7 +957,8 @@ impl DownstairsClient {
DsState::New
| DsState::WaitActive
| DsState::WaitQuorum
| DsState::Reconcile => panic!(
| DsState::Reconcile
| DsState::Stopping(ClientStopReason::Deactivated) => panic!(
"enqueue should not be called from state {:?}",
self.state
),
Expand Down

0 comments on commit 3eb259f

Please sign in to comment.