Page MenuHomePhabricator

[services] Backup - synchronize status access in reactors
AbandonedPublic

Authored by karol on Apr 20 2022, 11:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 30, 8:14 AM
Unknown Object (File)
Sun, Jun 30, 8:14 AM
Unknown Object (File)
Sun, Jun 30, 8:14 AM
Unknown Object (File)
Sun, Jun 30, 8:14 AM
Unknown Object (File)
Sun, Jun 30, 8:14 AM
Unknown Object (File)
Sun, Jun 30, 8:09 AM
Unknown Object (File)
Thu, Jun 27, 10:54 PM
Unknown Object (File)
Wed, Jun 26, 10:09 PM

Details

Reviewers
tomek
Summary

Depends on D3789

The issue was raised in https://phabricator.ashoat.com/D3720#103334 and I decided it would be the best to handle synchronization in the mutual code, therefore I first wanted to implement pulling services' mutual code into a single master class.

This is for the backup service.

Test Plan
cd services
yarn run-backup-service

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rebase incoming

tomek requested changes to this revision.Apr 26 2022, 10:02 AM
tomek added inline comments.
services/backup/src/Reactors/client/base-reactors/ClientBidiReactorBase.h
81–101

It seems like we should hold a mutex for the whole duration of this function. I think it will be hard to prove that nothing could go wrong when multiple threads would concurrently set and get the status in this function. For example, one thread can enter the first if, then another thread would enter the same if, then the first thread would set a status and then the second thread would set it to a different value.

This revision now requires changes to proceed.Apr 26 2022, 10:02 AM

This will no longer be needed in the new version of this stack (I'm going to transfer any unfinished threads)