diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-19 20:52:20 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-19 20:52:20 +0000 |
commit | 04acaea231a9af77e5ca05068336f4492fe32ac0 (patch) | |
tree | 412a346fed1a24b861a90c9a3e527e46f050ffa0 /src/table.rs | |
parent | 5ae32972efaba357ecc0027fe852d710b16b6d0e (diff) | |
download | garage-04acaea231a9af77e5ca05068336f4492fe32ac0.tar.gz garage-04acaea231a9af77e5ca05068336f4492fe32ac0.zip |
Don't do version & block_ref updates in background on deletion
Diffstat (limited to 'src/table.rs')
-rw-r--r-- | src/table.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/table.rs b/src/table.rs index 80364d17..d9b505c9 100644 --- a/src/table.rs +++ b/src/table.rs @@ -105,7 +105,7 @@ pub trait TableSchema: Send + Sync { type E: Entry<Self::P, Self::S>; type Filter: Clone + Serialize + for<'de> Deserialize<'de> + Send + Sync; - async fn updated(&self, old: Option<Self::E>, new: Option<Self::E>); + async fn updated(&self, old: Option<Self::E>, new: Option<Self::E>) -> Result<(), Error>; fn matches_filter(_entry: &Self::E, _filter: &Self::Filter) -> bool { true } @@ -469,7 +469,7 @@ where epidemic_propagate.push(new_entry.clone()); } - self.instance.updated(old_entry, Some(new_entry)).await; + self.instance.updated(old_entry, Some(new_entry)).await?; self.system .background .spawn(syncer.clone().invalidate(tree_key)); @@ -497,7 +497,7 @@ where } if let Some(old_val) = self.store.remove(&key)? { let old_entry = rmp_serde::decode::from_read_ref::<_, F::E>(&old_val)?; - self.instance.updated(Some(old_entry), None).await; + self.instance.updated(Some(old_entry), None).await?; self.system .background .spawn(syncer.clone().invalidate(key.to_vec())); |