Page MenuHomePhabricator

[blob] Batch check if blob exists
ClosedPublic

Authored by bartek on Thu, Sep 26, 12:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 27, 7:25 AM
Unknown Object (File)
Fri, Sep 27, 7:06 AM
Unknown Object (File)
Thu, Sep 26, 3:38 PM
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:10 AM
Unknown Object (File)
Thu, Sep 26, 1:01 AM
Subscribers

Details

Summary

Instead of calling GetItem for each blob (and get all its data) just to see if it exists, we can re-use db.list_existing_keys() which internally uses BatchGetItem to only get primary keys, all at once.
This improves DDB performance and reduces costs.

Updated batch-add-holders endpoint to use this.

Depends on D13480

Test Plan

Repeated test plan from D13480 confirmed it works the same way.

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

This part is updated in the next diff

services/blob/src/service.rs
289–291

This should work too

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