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, Oct 29, 11:47 AM
Unknown Object (File)
Sat, Oct 26, 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
Unknown Object (File)
Oct 4 2024, 4:20 AM
Unknown Object (File)
Oct 4 2024, 4:17 AM
Unknown Object (File)
Sep 25 2024, 9:47 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
Branch
linki
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Nov 21 2023, 8:25 AM
keyserver/src/services/blob.js
64

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

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.