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
F3491742: D4271.diff
Wed, Dec 18, 8:13 PM
Unknown Object (File)
Mon, Dec 16, 12:17 PM
Unknown Object (File)
Wed, Dec 11, 3:42 AM
Unknown Object (File)
Mon, Dec 9, 8:00 AM
Unknown Object (File)
Tue, Dec 3, 5:21 PM
Unknown Object (File)
Sun, Nov 24, 3:41 AM
Unknown Object (File)
Sun, Nov 24, 3:41 AM
Unknown Object (File)
Sun, Nov 24, 3:41 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