Page MenuHomePhabricator

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

Authored by karol on Jun 15 2022, 3:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 2, 7:31 PM
Unknown Object (File)
Sun, Jun 30, 8:52 AM
Unknown Object (File)
Wed, Jun 26, 8:16 PM
Unknown Object (File)
Wed, Jun 26, 3:52 PM
Unknown Object (File)
Wed, Jun 26, 7:13 AM
Unknown Object (File)
Wed, Jun 26, 7:13 AM
Unknown Object (File)
Wed, Jun 26, 7:13 AM
Unknown Object (File)
Wed, Jun 26, 7:12 AM

Details

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").

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

karol edited the test plan for this revision. (Show Details)
karol added a reviewer: tomek.
This revision is now accepted and ready to land.Jun 20 2022, 5:40 AM