Page MenuHomePhabricator

[blob] New endpoint to batch-add holders
ClosedPublic

Authored by bartek on Sep 26 2024, 12:23 AM.
Tags
None
Referenced Files
F3409372: D13480.id44584.diff
Wed, Dec 4, 4:19 PM
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)
Nov 1 2024, 4:22 PM
Unknown Object (File)
Nov 1 2024, 5:37 AM
Unknown Object (File)
Oct 12 2024, 1:29 AM
Unknown Object (File)
Oct 12 2024, 12:30 AM
Subscribers

Details

Summary

Address ENG-9356.

Created POST /holders endpoint on Blob Service.
Request is a list of blobHash-holder pairs.
Response is a list of results for each pair: blobHash, holder, dataExists, holderAlreadyExists, success

Depends on D13479

Test Plan

Ran Blob locally and used Postman to add some holders. To verify returned booleans, mixed this endpoint calls with calling single-blob endpoints to upload blobs, add/remove holders

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:52 AM
bartek added inline comments.
services/blob/src/http/handlers/holders.rs
21–34

Decided to use 1st proposal from the Linear discussion

50

Similarly to https://phab.comm.dev/D13479?id=44583#inline-77134 it is done in a loop because of underlying transactions, but could be improved if needed.

In further diffs in this stack, I partially improve this by batch-getting data_exists

This revision is now accepted and ready to land.Sep 27 2024, 2:41 AM
This revision was automatically updated to reflect the committed changes.