diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-27 13:37:20 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-27 13:37:20 +0100 |
commit | 32f1786f9ff17f12911f5f3f37e2d1c35d534f59 (patch) | |
tree | a7ae40d9b0f75c8a264734bb3fee314dfe699c25 /src/rpc/layout/manager.rs | |
parent | 01a0bd54106941156ca998be1a44b8ac2c3aa74a (diff) | |
download | garage-32f1786f9ff17f12911f5f3f37e2d1c35d534f59.tar.gz garage-32f1786f9ff17f12911f5f3f37e2d1c35d534f59.zip |
[next-0.10] cache layout check result
Diffstat (limited to 'src/rpc/layout/manager.rs')
-rw-r--r-- | src/rpc/layout/manager.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/layout/manager.rs b/src/rpc/layout/manager.rs index 3866f867..0ca532ba 100644 --- a/src/rpc/layout/manager.rs +++ b/src/rpc/layout/manager.rs @@ -160,12 +160,12 @@ impl LayoutManager { fn merge_layout(&self, adv: &LayoutHistory) -> Option<LayoutHistory> { let mut layout = self.layout.write().unwrap(); let prev_digest = layout.digest(); - let prev_layout_check = layout.inner().check().is_ok(); + let prev_layout_check = layout.is_check_ok(); if !prev_layout_check || adv.check().is_ok() { if layout.update(|l| l.merge(adv)) { layout.update_trackers(self.node_id); - if prev_layout_check && layout.inner().check().is_err() { + if prev_layout_check && !layout.is_check_ok() { panic!("Merged two correct layouts and got an incorrect layout."); } assert!(layout.digest() != prev_digest); |