HomePhabricator
Diffusion Comm 25e5617d4616

[services] Blob - use terminated clb instead of done clb

Description

[services] Blob - use terminated clb instead of done clb

Summary:
Depends on D4270

There are a couple of places where we may throw in this code and the problem with throwing errors in the done callback is that it results in a crash of the service. This is because in the done callback all grpc operations are done, so we cannot set an error state and send it to the client. So there's no other way to handle errors. Therefore, I converted the done callback to terminate the callback in the blob's put reactor so we can properly handle errors that come from invalid users' input. I think it doesn't affect the validity of the way this service is working.

Test Plan: send blob with the same holder twice. Before, the blob service would crash. Now it just sends back an error message to the client (something like "an item with this holder already exists").

Reviewers: palys-swm

Reviewed By: palys-swm

Subscribers: ashoat, palys-swm, Adrian, atul, yayabosh

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

Details

Provenance
karolAuthored on Jun 30 2022, 6:34 AM
Reviewer
tomek
Differential Revision
D4271: [services] Blob - use terminated clb instead of done clb
Parents
rCOMM81ca99963ae2: [services] Lib - fix bugs in ClientWriteReactorBase
Branches
Unknown
Tags
Unknown