Page MenuHomePhabricator

[blob] Add option to instantly delete a blob
ClosedPublic

Authored by bartek on Dec 1 2023, 7:20 AM.
Tags
None
Referenced Files
F2154662: D10135.diff
Sun, Jun 30, 7:44 PM
F2148458: D10135.id34123.diff
Sun, Jun 30, 5:09 AM
Unknown Object (File)
Sat, Jun 29, 1:00 PM
Unknown Object (File)
Thu, Jun 27, 3:25 PM
Unknown Object (File)
Sun, Jun 23, 11:24 PM
Unknown Object (File)
Sun, Jun 23, 11:13 PM
Unknown Object (File)
Wed, Jun 19, 10:18 PM
Unknown Object (File)
Sun, Jun 16, 7:22 AM
Subscribers

Details

Summary

Resolves ENG-5580.

Added a instant_delete option to the DELETE request payload. If set to true, the blob will be deleted immediately after last holder is revoked. Otherwise, it will be deleted during the next cleanup run.

The DELETE request payload now looks like this:

{
  holder: "some_holder",
  blob_hash: "some_hash",
  // defaults to false if not provided
  instant_delete: true
}
Test Plan

1a. Started blob without --instant-delete flag. Uploaded a blob, revoked a holder, then ensured it is still accessible with GET request. (did not run a cleanup job)
1b. Ran a cleanup job, ensured the blob is deleted.

  1. Started blob with --instant-delete flag. Uploaded a blob, revoked a holder, then ensured it is not accessible with GET request. (did not run a cleanup job)
  2. Started blob with --instant-delete flag. Uploaded a blob, revoked a holder by using DELETE request with instant_delete set to true, result is the same as in 2.

Diff Detail

Repository
rCOMM Comm
Branch
barthap/blob-instant-delete
Lint
No Lint Coverage
Unit
No Test Coverage