aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/layout/tracker.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-09 11:19:43 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-09 11:19:43 +0100
commit523d2ecb9511f74e144cd116b942d6c1bf0f546d (patch)
tree7ba0323fb691eac4f05308676cd24771a8a6a8bb /src/rpc/layout/tracker.rs
parent1da0a5676edcd20fc5c7412596edb5772da9f606 (diff)
downloadgarage-523d2ecb9511f74e144cd116b942d6c1bf0f546d.tar.gz
garage-523d2ecb9511f74e144cd116b942d6c1bf0f546d.zip
layout: use separate CRDT for staged layout changes
Diffstat (limited to 'src/rpc/layout/tracker.rs')
-rw-r--r--src/rpc/layout/tracker.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/rpc/layout/tracker.rs b/src/rpc/layout/tracker.rs
deleted file mode 100644
index 778121e4..00000000
--- a/src/rpc/layout/tracker.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-use super::*;
-
-impl UpdateTracker {
- fn merge(&mut self, other: &UpdateTracker) {
- for (k, v) in other.0.iter() {
- if let Some(v_mut) = self.0.get_mut(k) {
- *v_mut = std::cmp::max(*v_mut, *v);
- } else {
- self.0.insert(*k, *v);
- }
- }
- }
-}
-
-impl UpdateTrackers {
- pub(crate) fn merge(&mut self, other: &UpdateTrackers) {
- self.ack_map.merge(&other.ack_map);
- self.sync_map.merge(&other.sync_map);
- self.sync_ack_map.merge(&other.sync_ack_map);
- }
-}