aboutsummaryrefslogtreecommitdiff
path: root/src/block_ref_table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-17 17:09:57 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-17 17:09:57 +0200
commit69f1d8fef23149e45189c296e0c0d23e040cbb0e (patch)
treeb213f119ae5eea620ab140cd712362707af28ddb /src/block_ref_table.rs
parente41ce4d81528388f043c1c5e6608df45347ea70d (diff)
downloadgarage-69f1d8fef23149e45189c296e0c0d23e040cbb0e.tar.gz
garage-69f1d8fef23149e45189c296e0c0d23e040cbb0e.zip
WIP
TODOs: - ensure sync goes both way - finish sending blocks to other nodes when they need them before deleting
Diffstat (limited to 'src/block_ref_table.rs')
-rw-r--r--src/block_ref_table.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/block_ref_table.rs b/src/block_ref_table.rs
index cf24fea7..5f6ce21b 100644
--- a/src/block_ref_table.rs
+++ b/src/block_ref_table.rs
@@ -44,6 +44,7 @@ impl TableSchema for BlockRefTable {
type P = Hash;
type S = UUID;
type E = BlockRef;
+ type Filter = ();
async fn updated(&self, old: Option<Self::E>, new: Option<Self::E>) {
let block = &old.as_ref().or(new.as_ref()).unwrap().block;
@@ -60,4 +61,8 @@ impl TableSchema for BlockRefTable {
}
}
}
+
+ fn matches_filter(entry: &Self::E, _filter: &Self::Filter) -> bool {
+ !entry.deleted
+ }
}