Skip to content

Commit 88c45ee

Browse files
authored
Remember that a replaced downstairs is replaced (#1426)
Leave a downstairs in state Replaced after a replacement request until we connect to the new downstairs and either validate it is correct or determine it is bad. This fixes a bug where a replaced downstairs would go to failed, then cause problems when we eventually connect to that downstairs. Fix for: #1425
1 parent d4d9cae commit 88c45ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

upstairs/src/client.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,7 @@ impl DownstairsClient {
532532

533533
DsState::Faulted
534534
| DsState::LiveRepair
535-
| DsState::LiveRepairReady
536-
| DsState::Replaced => DsState::Faulted,
535+
| DsState::LiveRepairReady => DsState::Faulted,
537536

538537
DsState::New
539538
| DsState::Deactivated
@@ -546,7 +545,8 @@ impl DownstairsClient {
546545
| DsState::WaitActive
547546
| DsState::Disabled => DsState::Disconnected,
548547

549-
DsState::Replacing => DsState::Replaced,
548+
// If we have replaced a downstairs, don't forget that.
549+
DsState::Replacing | DsState::Replaced => DsState::Replaced,
550550

551551
DsState::Migrating => panic!(),
552552
};

0 commit comments

Comments
 (0)