Page MenuHomePhabricator

[blob] New endpoint to batch-add holders
ClosedPublic

Authored by bartek on Thu, Sep 26, 12:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 27, 7:34 AM
Unknown Object (File)
Fri, Sep 27, 7:20 AM
Unknown Object (File)
Fri, Sep 27, 6:56 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-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.Thu, Sep 26, 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.Fri, Sep 27, 2:41 AM
This revision was automatically updated to reflect the committed changes.