From 08bcd5195654ae073afe31c341f0ce4b36094da0 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 16 Mar 2021 16:51:15 +0100 Subject: GC object table in a specific case --- src/model/object_table.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/model/object_table.rs') diff --git a/src/model/object_table.rs b/src/model/object_table.rs index 99fad3ce..62606df4 100644 --- a/src/model/object_table.rs +++ b/src/model/object_table.rs @@ -146,6 +146,9 @@ impl Entry for Object { fn sort_key(&self) -> &String { &self.key } + fn is_tombstone(&self) -> bool { + self.versions.len() == 1 && self.versions[0].state == ObjectVersionState::Complete(ObjectVersionData::DeleteMarker) + } } impl CRDT for Object { -- cgit v1.2.3