A tombstone only means something if reads obey it. Today you make Get treat a tombstone as not-found, so a deleted key stays deleted even when an older SSTable still holds its old value.
Make Get return not-found when the newest entry for a key is a tombstone.
A tombstone is only a delete if the read path stops at it. Walking sources
newest-first, the first entry you find for a key is authoritative regardless of its
kind: a Put means “here is the current value,” a Delete means “this key is
gone, stop.” The critical bug to avoid is treating a tombstone as a miss and
continuing into older tables - that would resurrect the deleted value from the
SSTable underneath.
Today this only has to hold for point lookups; the same rule extends to range scans
func (d *DB) Get(key string) ([]byte, bool) {// walk sources newest-first as before, but stop at the FIRST// entry for the key whichever kind it is:// Put -> return its value, found// Delete -> return not-found (do NOT keep looking in older tables)}