aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/system.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-11 18:41:15 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-11 18:41:15 +0100
commit2c2e65ad8b37128612ba47a777eacbae5e43f3ab (patch)
treea6e224afbb35e2baa88091731870ff575d118664 /src/rpc/system.rs
parentdefd7d9e6353e10b0b9d58b66aad4f04e7d50c41 (diff)
parentec12d6c8ddde0f1dc908e43fef0ecc88d1e5406b (diff)
downloadgarage-2c2e65ad8b37128612ba47a777eacbae5e43f3ab.tar.gz
garage-2c2e65ad8b37128612ba47a777eacbae5e43f3ab.zip
Merge commit 'ec12d6c' into next
Diffstat (limited to 'src/rpc/system.rs')
-rw-r--r--src/rpc/system.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/system.rs b/src/rpc/system.rs
index 2c6f14fd..ea92b570 100644
--- a/src/rpc/system.rs
+++ b/src/rpc/system.rs
@@ -662,9 +662,9 @@ impl System {
let update_ring = self.update_ring.lock().await;
let mut layout: ClusterLayout = self.ring.borrow().layout.clone();
- let prev_layout_check = layout.check();
+ let prev_layout_check = layout.check().is_ok();
if layout.merge(adv) {
- if prev_layout_check && !layout.check() {
+ if prev_layout_check && !layout.check().is_ok() {
error!("New cluster layout is invalid, discarding.");
return Err(Error::Message(
"New cluster layout is invalid, discarding.".into(),
@@ -717,7 +717,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();
+ let not_configured = !self.ring.borrow().layout.check().is_ok();
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