Page MenuHomePhabricator

Support DestructionEngine in MetaMTAMail

Authored by epriestley on Feb 1 2018, 7:37 PM.



Depends on D18984. Ref T13053. See D13408 for the original change and why this doesn't use DestructionEngine right now. The quick version is:

  • It causes us to write a destruction log, which is slightly silly (we're deleting one thing and creating another).
  • It's a little bit slower than not using DestructionEngine.

However, it gets us some stuff for free that's likely relevant now (e.g., Herald Transcript cleanup) and I'm planning to move attachments to Files, but want to be able to delete them when mail is destroyed.

The destruction log is a touch silly, but those records are very small and that log gets GC'd later without generating new logs. We could silence the log from the GC if it's ever an issue.

Test Plan

Used bin/remove destroy and bin/garbage collect --collector mail.sent to destroy mail and collect garbage.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.