Depends on D5035
In order to be able to handle multiple connections at the same time, we have to store a collection of clients in the rust state instead of having just one.
Here, I'm making the c++ calls to rust for the put client valid.
Paths
| Differential D5036 Authored by • karol on Sep 2 2022, 3:52 AM.
Details Summary Depends on D5035 In order to be able to handle multiple connections at the same time, we have to store a collection of clients in the rust state instead of having just one. Here, I'm making the c++ calls to rust for the put client valid. Test Plan cd services yarn run-integration-tests backup
Diff Detail
Event TimelineHerald added a reviewer: • jon. · View Herald TranscriptSep 2 2022, 3:52 AM2022-09-02 03:52:26 (UTC-7) • karol mentioned this in D5035: [services] Rust Integration - Backup - Rust - Multiple put clients.Sep 2 2022, 3:59 AM2022-09-02 03:59:41 (UTC-7) • karol added a parent revision: D5035: [services] Rust Integration - Backup - Rust - Multiple put clients. • karol added a child revision: D5037: [services] Rust Integration - Backup - Rust - Multiple get clients. Harbormaster completed remote builds in B11830: Diff 16235.Sep 2 2022, 4:02 AM2022-09-02 04:02:10 (UTC-7) Comment Actions Can we avoid having to put an additional argument to every call? This is error-prone. This revision now requires changes to proceed.Sep 5 2022, 8:05 AM2022-09-05 08:05:02 (UTC-7) Comment Actions
I think so, I'm not sure if this is so much error-prone, why? We have to specify what holder do we refer to. I don't know how else would we do that. Comment Actions
If all the functions share the same context, we can create a struct and make functions methods of this struct (described in D5036).
In each function we need to remember to pass exactly the same string. The problem is that we accept any string as a type, so the only way to make sure we use the same value is by careful reading, which isn't maintainable. If the solution with struct is a hard one, we can consider keeping this approach, but maybe there are other ways of achieving that. This revision now requires changes to proceed.Sep 7 2022, 6:15 AM2022-09-07 06:15:59 (UTC-7) Comment Actions I see your point. I would go with a follow-up for this as it looks uncertain and it may be quite a lot of work/refactoring. https://linear.app/comm/issue/ENG-1759/avoid-specifying-context-for-each-rust-function This revision now requires changes to proceed.Sep 9 2022, 4:38 AM2022-09-09 04:38:29 (UTC-7) • karol added inline comments. This revision is now accepted and ready to land.Sep 13 2022, 10:50 AM2022-09-13 10:50:44 (UTC-7) This revision was landed with ongoing or failed builds.Sep 16 2022, 1:54 AM2022-09-16 01:54:50 (UTC-7) Closed by commit rCOMM26475982e7b9: [services] Rust Integration - Backup - c++ - Multiple put clients (authored by • karol). · Explain Why This revision was automatically updated to reflect the committed changes. Harbormaster completed remote builds in B12202: Diff 16737.Sep 16 2022, 2:04 AM2022-09-16 02:04:23 (UTC-7)
Revision Contents
Diff 16235 services/backup/src/Reactors/server/AddAttachmentsUtility.cpp
services/backup/src/Reactors/server/CreateNewBackupReactor.cpp
services/backup/src/Reactors/server/SendLogReactor.cpp
|