aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/system.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-09-27 09:04:32 +0000
committerAlex <alex@adnab.me>2023-09-27 09:04:32 +0000
commitaa7eadc799ebd0d668ff29b155255acfdfa1d9b5 (patch)
treefc50c4b784cc0d380ded4306a83d8237c482149f /src/rpc/system.rs
parent1d986bd889a5f5fe1bdc75e7d4b34acc2cfbe09f (diff)
parent0e5925fff6d9b3147de4967e1963b4c785d0055f (diff)
downloadgarage-aa7eadc799ebd0d668ff29b155255acfdfa1d9b5.tar.gz
garage-aa7eadc799ebd0d668ff29b155255acfdfa1d9b5.zip
Merge pull request 'New layout: fixes and UX improvements' (#634) from new-layout-ux into nextv0.9.0-beta3
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/634
Diffstat (limited to 'src/rpc/system.rs')
-rw-r--r--src/rpc/system.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/system.rs b/src/rpc/system.rs
index 8fba9580..7fc3c20c 100644
--- a/src/rpc/system.rs
+++ b/src/rpc/system.rs
@@ -668,7 +668,7 @@ impl System {
let prev_layout_check = layout.check().is_ok();
if layout.merge(adv) {
- if prev_layout_check && !layout.check().is_ok() {
+ if prev_layout_check && layout.check().is_err() {
error!("New cluster layout is invalid, discarding.");
return Err(Error::Message(
"New cluster layout is invalid, discarding.".into(),
@@ -724,7 +724,7 @@ impl System {
async fn discovery_loop(self: &Arc<Self>, mut stop_signal: watch::Receiver<bool>) {
while !*stop_signal.borrow() {
- let not_configured = !self.ring.borrow().layout.check().is_ok();
+ let not_configured = self.ring.borrow().layout.check().is_err();
let no_peers = self.fullmesh.get_peer_list().len() < self.replication_factor;
let expected_n_nodes = self.ring.borrow().layout.num_nodes();
let bad_peers = self