aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/layout/history.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-11 12:37:33 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-11 12:44:27 +0100
commitdf24bb806d64d5d5e748c35efe3f49ad3dda709e (patch)
tree4314a04ba2f01a297eedd0a45566551e74239ef2 /src/rpc/layout/history.rs
parentce89d1ddabe3b9e638b0173949726522ae9a0311 (diff)
downloadgarage-df24bb806d64d5d5e748c35efe3f49ad3dda709e.tar.gz
garage-df24bb806d64d5d5e748c35efe3f49ad3dda709e.zip
layout/sync: fix bugs and add tracing
Diffstat (limited to 'src/rpc/layout/history.rs')
-rw-r--r--src/rpc/layout/history.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/layout/history.rs b/src/rpc/layout/history.rs
index 185dbb27..cef56647 100644
--- a/src/rpc/layout/history.rs
+++ b/src/rpc/layout/history.rs
@@ -131,7 +131,8 @@ impl LayoutHistory {
pub(crate) fn cleanup_old_versions(&mut self) {
let min_sync_ack = self.calculate_global_min(&self.update_trackers.sync_ack_map);
while self.versions.first().as_ref().unwrap().version < min_sync_ack {
- self.versions.remove(0);
+ let removed = self.versions.remove(0);
+ info!("Layout history: pruning old version {}", removed.version);
}
}