A TTL index deletes documents silently when a date passes. Retention of records needs holds, proof, content deletion and a stub. Here is the difference, with code.
Every few months I meet a document platform where "retention" is implemented like this:
db . documents . createIndex ({ " lifecycle.retention.dispositionDue " : 1 }, { expireAfterSeconds : 0 })
Enter fullscreen mode
Exit fullscreen mode
One line, done. Documents disappear when their disposition date passes. It even sounds like records management.
It is not, and the gap between the two is the gap between a platform that can answer an auditor and one that cannot. This post goes through what a TTL index actually does, operationally, and what a disposition run must do instead.…