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)
Wed, Dec 18, 10:02 AM
Unknown Object (File)
Wed, Dec 18, 10:02 AM
Unknown Object (File)
Wed, Dec 18, 10:02 AM
Unknown Object (File)
Wed, Dec 18, 10:02 AM
Unknown Object (File)
Mon, Nov 25, 12:05 AM
Unknown Object (File)
Nov 16 2024, 2:03 PM
Unknown Object (File)
Nov 10 2024, 4:18 PM
Unknown Object (File)
Nov 8 2024, 3:02 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.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

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.Sep 27 2024, 2:36 AM