diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-16 16:51:15 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-16 16:51:15 +0100 |
commit | 08bcd5195654ae073afe31c341f0ce4b36094da0 (patch) | |
tree | 2c723a1cfb2b2083af72f0b887893e0fd09db634 /src/model/object_table.rs | |
parent | 1bfe9c129e2cc3780e784b0c4a784fa1679a3f97 (diff) | |
download | garage-08bcd5195654ae073afe31c341f0ce4b36094da0.tar.gz garage-08bcd5195654ae073afe31c341f0ce4b36094da0.zip |
GC object table in a specific case
Diffstat (limited to 'src/model/object_table.rs')
-rw-r--r-- | src/model/object_table.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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<String, String> 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 { |