The Tombstone That Stays

A tablet holds four SSTables written in this order, oldest first.

file contents for row user#42
SST-1 email = a@x.com
SST-2 email = b@x.com
SST-3 deletion entry for email
SST-4 (nothing for this row)

A background merging compaction rewrites only SST-3 and SST-4 into a single new file. SST-1 and SST-2 are not inputs. What does the output file contain for user#42, and why?

A

The deletion entry plus a rewritten copy of email = b@x.com, so a later read can still see the pre-delete value.

B

The deletion entry, unchanged. A non-major compaction must keep it because SST-1 and SST-2 are still live and it is the only thing suppressing their values.

C

Nothing. The deletion entry has been applied, so the row is gone and the file has no record of it.

D

email = b@x.com. Merging compaction resolves the newest write, and SST-3 only marks the value as pending removal.