Page MenuHomePhabricator

[keyserver] Check if a blob exists
ClosedPublic

Authored by tomek on Nov 21 2023, 8:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 5, 3:56 AM
Unknown Object (File)
Sun, May 5, 3:55 AM
Unknown Object (File)
Sun, May 5, 3:05 AM
Unknown Object (File)
Sun, Apr 21, 3:34 PM
Unknown Object (File)
Thu, Apr 18, 10:02 PM
Unknown Object (File)
Tue, Apr 16, 5:59 PM
Unknown Object (File)
Sun, Apr 14, 8:00 AM
Unknown Object (File)
Sun, Apr 14, 7:39 AM
Subscribers

Details

Summary

After fetching a blob, check if it exists, and return different result depending on the test.

Depends on D9942

Test Plan

Create a script that tries to download two blobs - one with existing hash and one without. Check if the result is correct.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Nov 21 2023, 8:25 AM
keyserver/src/services/blob.js
64 ↗(On Diff #33459)

Downloading entire blob sounds like quite expensive operation just to check for blob existence. Are we sure there are no other ways to achieve similar result with less cost? Or is it the case that everytime we check for blob existence wa actually want to have it downloaded if it exists? If both answers are "no" then it looks like blob service might be missing some API.

keyserver/src/services/blob.js
64 ↗(On Diff #33459)

For invite links, blobs should be rather small - a string representing an object with an ID and a URL, so the cost of downloading the entire blob shouldn't be important. And almost every time we download an invite link blob, we would check what's inside it.

This revision is now accepted and ready to land.Nov 23 2023, 6:54 AM
This revision was automatically updated to reflect the committed changes.