Page MenuHomePhabricator

[blob] New endpoint to batch-delete holders
ClosedPublic

Authored by bartek on Thu, Sep 26, 12:19 AM.
Tags
None
Referenced Files
F2840906: D13479.id44583.diff
Sun, Sep 29, 8:36 AM
Unknown Object (File)
Fri, Sep 27, 7:16 AM
Unknown Object (File)
Fri, Sep 27, 7:05 AM
Unknown Object (File)
Fri, Sep 27, 7:05 AM
Unknown Object (File)
Thu, Sep 26, 1:18 AM
Unknown Object (File)
Thu, Sep 26, 1:15 AM
Unknown Object (File)
Thu, Sep 26, 1:11 AM
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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Thu, Sep 26, 12:46 AM
bartek edited reviewers, added: tomek; removed: varun.
bartek added inline comments.
services/blob/src/http/handlers/holders.rs
46

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

worth adding as code comment

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