Page MenuHomePhabricator

[services] Backup/Blob - wrap terminateCallback into try...catch
ClosedPublic

Authored by karol on Apr 13 2022, 7:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 2:34 PM
Unknown Object (File)
Fri, Dec 20, 2:34 PM
Unknown Object (File)
Fri, Dec 20, 2:34 PM
Unknown Object (File)
Fri, Dec 20, 2:34 PM
Unknown Object (File)
Fri, Dec 20, 2:30 PM
Unknown Object (File)
Fri, Dec 20, 1:11 AM
Unknown Object (File)
Thu, Dec 5, 11:39 PM
Unknown Object (File)
Sat, Nov 30, 7:44 AM

Details

Summary

Depends on D3720

We need to be able to throw in the terminationCallback and handle it gracefully.

Test Plan
cd services
yarn run-backup-service
yarn run-blob-service

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested changes to this revision.Apr 15 2022, 9:51 AM
tomek added inline comments.
services/backup/docker-server/contents/server/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
42–48 ↗(On Diff #11419)

This should be a separate diff. In this diff we should only

wrap terminateCallback into try...catch

This revision now requires changes to proceed.Apr 15 2022, 9:51 AM
karol added inline comments.
services/backup/docker-server/contents/server/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
42–48 ↗(On Diff #11419)

I don't understand this feedback, sorry. I'm indeed wrapping terminateCallback invocation in the try ... catch block. Can you specify what exactly is wrong here?

tomek requested changes to this revision.Apr 21 2022, 1:09 AM

This diff isn't too complicated, but we should introduce a habit of having diffs that focus on one thing.
This diff does three things:

  1. It wraps terminateCallback with try-catch - which should be the only code here
  2. It introduces and calls validate method
  3. It fixes a bug where we were using state instead of this->state

Please split this diff.

As a side note, it would be a lot more efficient if the diff was split at the beginning. Each of these diffs would be an instant accept.

services/backup/docker-server/contents/server/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
42–48 ↗(On Diff #11419)

Yes, you're doing that. But also you're introducing validate method, which isn't mentioned in diff title or summary. Please try to create diffs that do one thing. If that is not convenient, we should at least explain why is that.

services/blob/src/Reactors/server/base-reactors/ServerReadReactorBase.h
52 ↗(On Diff #11419)

What is the reason of this change? Is it a part of wrapping with try-catch? It looks like this change fixes a bug.

This revision now requires changes to proceed.Apr 21 2022, 1:09 AM
karol edited the summary of this revision. (Show Details)

split

This diff has been split into:

In D3721#105122, @karol-bisztyga wrote:

This diff has been split into:

Nice, thanks!

This revision is now accepted and ready to land.Apr 21 2022, 2:36 AM