mutation compactor: query compaction: ignore purgeable tombstones

This behaviour is makes query result building sensitive to whether the
data was recently compacted or not, in particular different digests will
be produced depending on whether purgeable tombstones happened to be
compacted (and thus purged) or not. This means that two replicas can
produce different digests for the same data if has compacted some
purgeable tombstones and the other not.

To avoid this, drop purgeable tombstones during query compaction as
well.
This commit is contained in:
Botond Dénes
2021-01-18 13:59:24 +02:00
parent 570d15c7bc
commit 73808c12eb

View File

@@ -291,6 +291,10 @@ public:
// We are passing only dead (purged) data so pass is_live=false.
gc_consumer.consume(std::move(sr_garbage), current_tombstone, false);
});
} else {
if (can_purge_tombstone(current_tombstone)) {
current_tombstone = {};
}
}
_static_row_live = is_live;
if (is_live || (!only_live() && !sr.empty())) {
@@ -333,6 +337,10 @@ public:
// We are passing only dead (purged) data so pass is_live=false.
gc_consumer.consume(std::move(cr_garbage), t, false);
});
} else {
if (can_purge_tombstone(t)) {
t = {};
}
}
if (only_live() && is_live) {