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
F3378100: D3721.id11707.diff
Wed, Nov 27, 8:57 AM
F3377522: D3721.diff
Wed, Nov 27, 6:13 AM
Unknown Object (File)
Tue, Nov 19, 2:59 AM
Unknown Object (File)
Tue, Nov 19, 12:29 AM
Unknown Object (File)
Tue, Nov 5, 5:19 PM
Unknown Object (File)
Oct 21 2024, 4:29 AM
Unknown Object (File)
Oct 16 2024, 8:38 AM
Unknown Object (File)
Oct 16 2024, 8:38 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
No Lint Coverage
Unit
No Test Coverage

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

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

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

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

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