Expand description
Restore a record from its tombstone, while the tombstone still exists (ADR 0029).
Only the kinds whose body a tombstone retains can be restored — the manifest kinds. Every other tombstone has an empty body, so there is nothing to restore from.
This rides Store::put_raw rather than put. A consumer put treats a
tombstone as absent and re-stamps meta.created, which is right for put —
it cannot tell restoring a deleted record from reusing a recycled key, and
must not change meaning depending on whether collect has run. put_raw
never re-stamps, so an explicit restore keeps the record’s age. “Raw” means a
record that already happened, and a restoration is exactly that.
Functions§
- undelete
- Restore the record at
keyfrom its tombstone, returning the revision written.author, when given, is stamped as the restorer;Nonekeeps the tombstone’s author.