Page MenuHomePhabricator

[blob] New endpoint to batch-delete holders
ClosedPublic

Authored by bartek on Sep 26 2024, 12:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 4:18 PM
Unknown Object (File)
Fri, Nov 8, 3:02 AM
Unknown Object (File)
Fri, Nov 8, 3:02 AM
Unknown Object (File)
Thu, Nov 7, 5:13 PM
Unknown Object (File)
Thu, Nov 7, 12:09 PM
Unknown Object (File)
Thu, Nov 7, 11:59 AM
Unknown Object (File)
Thu, Nov 7, 11:58 AM
Unknown Object (File)
Fri, Nov 1, 4:22 PM
Subscribers

Details

Summary

Address ENG-4842.
Request and response format described in the Linear issue.

Created a new DELETE /holders endpoint for removing multiple holders in a single request.

Test Plan

Ran Blob locally. Called the endpoint using Postman and made sure holders are removed from DDB.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Sep 26 2024, 12:46 AM
bartek edited reviewers, added: tomek; removed: varun.
bartek added inline comments.
services/blob/src/http/handlers/holders.rs
46 ↗(On Diff #44583)

This has to be done sequentially in a loop because service.revoke_holder() makes a DDB transaction and these transactions could conflict with each other, e.g. if two holders were removed for the same blob hash.

It is theoretically possible to make it one transaction but it's complicated and not worth doing as long as performance is okay

kamil added inline comments.
services/blob/src/http/handlers/holders.rs
46 ↗(On Diff #44583)

worth adding as code comment

This revision is now accepted and ready to land.Sep 27 2024, 2:36 AM