aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/layout/manager.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-03-27 13:47:06 +0100
committerAlex Auvolat <alex@adnab.me>2024-03-27 13:47:06 +0100
commit4eba32f29fceea5ab19e44900f8d3a6864989d55 (patch)
tree88ffe594340ed4f32b169649c8302b073320e36c /src/rpc/layout/manager.rs
parent32f1786f9ff17f12911f5f3f37e2d1c35d534f59 (diff)
downloadgarage-4eba32f29fceea5ab19e44900f8d3a6864989d55.tar.gz
garage-4eba32f29fceea5ab19e44900f8d3a6864989d55.zip
[next-0.10] layout helper: rename & clarify updates to update trackers
Diffstat (limited to 'src/rpc/layout/manager.rs')
-rw-r--r--src/rpc/layout/manager.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rpc/layout/manager.rs b/src/rpc/layout/manager.rs
index 0ca532ba..a0dcf50e 100644
--- a/src/rpc/layout/manager.rs
+++ b/src/rpc/layout/manager.rs
@@ -70,7 +70,7 @@ impl LayoutManager {
cluster_layout,
Default::default(),
);
- cluster_layout.update_trackers(node_id.into());
+ cluster_layout.update_update_trackers(node_id.into());
let layout = Arc::new(RwLock::new(cluster_layout));
let change_notify = Arc::new(Notify::new());
@@ -134,7 +134,7 @@ impl LayoutManager {
fn ack_new_version(self: &Arc<Self>) {
let mut layout = self.layout.write().unwrap();
- if layout.ack_max_free(self.node_id) {
+ if layout.update_ack_to_max_free(self.node_id) {
self.broadcast_update(SystemRpc::AdvertiseClusterLayoutTrackers(
layout.inner().update_trackers.clone(),
));
@@ -164,7 +164,7 @@ impl LayoutManager {
if !prev_layout_check || adv.check().is_ok() {
if layout.update(|l| l.merge(adv)) {
- layout.update_trackers(self.node_id);
+ layout.update_update_trackers(self.node_id);
if prev_layout_check && !layout.is_check_ok() {
panic!("Merged two correct layouts and got an incorrect layout.");
}
@@ -182,7 +182,7 @@ impl LayoutManager {
if layout.inner().update_trackers != *adv {
if layout.update(|l| l.update_trackers.merge(adv)) {
- layout.update_trackers(self.node_id);
+ layout.update_update_trackers(self.node_id);
assert!(layout.digest() != prev_digest);
return Some(layout.inner().update_trackers.clone());
}