GC object table in a specific case

This commit is contained in:
Alex Auvolat 2021-03-16 16:51:15 +01:00
parent 1bfe9c129e
commit 08bcd51956
2 changed files with 4 additions and 1 deletions

View File

@ -259,7 +259,7 @@ impl BlockManager {
if let Err(e) = self.resync_iter(&mut must_exit).await { if let Err(e) = self.resync_iter(&mut must_exit).await {
warn!("Error in block resync loop: {}", e); warn!("Error in block resync loop: {}", e);
select! { select! {
_ = tokio::time::sleep(Duration::from_secs(10)).fuse() => (), _ = tokio::time::sleep(Duration::from_secs(1)).fuse() => (),
_ = must_exit.changed().fuse() => (), _ = must_exit.changed().fuse() => (),
} }
} }

View File

@ -146,6 +146,9 @@ impl Entry<String, String> for Object {
fn sort_key(&self) -> &String { fn sort_key(&self) -> &String {
&self.key &self.key
} }
fn is_tombstone(&self) -> bool {
self.versions.len() == 1 && self.versions[0].state == ObjectVersionState::Complete(ObjectVersionData::DeleteMarker)
}
} }
impl CRDT for Object { impl CRDT for Object {