HomePhabricator
Diffusion Comm 36354e261080

[blob] Batch check if blob exists

Description

[blob] Batch check if blob exists

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.

Reviewers: will, varun, kamil, marcin

Reviewed By: kamil

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D13481

Details

Provenance
bartekAuthored on Sep 25 2024, 3:03 AM
Reviewer
kamil
Differential Revision
D13481: [blob] Batch check if blob exists
Parents
rCOMMf8deb7ba706e: [blob] New endpoint to batch-add holders
Branches
Unknown
Tags
Unknown