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)
Tue, Nov 26, 5:16 PM
Unknown Object (File)
Sun, Nov 24, 12:09 AM
Unknown Object (File)
Sat, Nov 23, 3:43 AM
Unknown Object (File)
Oct 29 2024, 11:47 AM
Unknown Object (File)
Oct 26 2024, 8:28 PM
Unknown Object (File)
Oct 22 2024, 4:44 PM
Unknown Object (File)
Oct 4 2024, 4:21 AM
Unknown Object (File)
Oct 4 2024, 4:21 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.