How does Scavenging work for Hard vs Soft Deletes?


My team is a little confused on how EventStore handles scavenging for “Hard Delete” (tombstone) vs “Soft Delete” (truncate before).

In the deleting streams documentation, scavenging is only explicitly called out for hard deleted streams: “The events in the deleted stream are liable to be removed in a scavenge, but the tombstone event remains.”

However, in the scavenging documentation, it says that how often to run a scavenge depends “on how you set $maxAge, $maxCount or $tb metadata on your streams.” (this seems to imply to me it also scavenges soft-deletes).

So does it scavenge for both? If so, why would one choose to Tombstone a stream? It seems like it’s functionally equivalent but with more downsides.

It scavenges both. You would want to tombstone a stream to prevent any additional appends. IoW 404 Not found vs 410 Gone.