Page MenuHomePhabricator
Feed Advanced Search

Aug 19 2022

max updated the diff for D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.

Fixing space.

Aug 19 2022, 11:25 AM
max added inline comments to D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.
Aug 19 2022, 11:18 AM
max updated the diff for D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.

Check for an isEmpty was added.

Aug 19 2022, 11:14 AM
max requested review of D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.
Aug 19 2022, 9:37 AM
max added a comment to D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.
In D4740#140197, @tomek wrote:

So there are a lot of potential issues with detaching, and it doesn't seem necessary at this point. @max could you try to find a solution where detach isn't used?

Aug 19 2022, 8:24 AM
max requested review of D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.
In D4740#140130, @karol wrote:

Yet one more reason why I'd avoid detach here: https://stackoverflow.com/a/54207121/15854120

Long story short, accessing external resources from the detached thread causes undefined behavior. And here, in connect(), we use fields like: this->lastConnectionTimestamp, this->lastConnectionTimestamp (EDIT: Ok, sorry I missed the "static storage" thing, but still it brings a danger to the house).

Aug 19 2022, 8:19 AM
max requested review of D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.
Aug 19 2022, 6:59 AM
max added a comment to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
In D4805#141290, @varun wrote:

I think max is planning some changes to this diff so i'm pushing it back to his queue

Aug 19 2022, 3:41 AM
max requested review of D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
In D4805#141119, @jon wrote:

that being said, it's hard to use install(EXPORT when using add_subdirectory. Essentially someone would need to do cmake .. && make install. And then they would be able to use the install(EXPORT contents.

I'm okay with doing add_library(${namespace}::${_LIB_PATH_STEM} ALIAS ${_LIB_PATH_STEM}-total), I just don't think it's canonical. I believe https://cmake.org/cmake/help/latest/command/export.html#targets is the correct thing to use.
I just have no idea how to actually use the exported file, as it's not generated until after cmake configure.

Aug 19 2022, 3:40 AM
max updated the diff for D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates.

Rebased on parent D4805 changes.

Aug 19 2022, 3:24 AM
max updated the summary of D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 19 2022, 3:21 AM
max planned changes to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 19 2022, 3:19 AM
max updated the diff for D4805: [services] Add CMake file with functions for Corrosion and CXX integration.

Removing of detect_cargo_target_architecture.
Check for an empty Rust_CARGO_TARGET was added.

Aug 19 2022, 3:19 AM

Aug 18 2022

max planned changes to D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates.
Aug 18 2022, 8:27 AM
max requested review of D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 18 2022, 8:23 AM
max added inline comments to D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates.
Aug 18 2022, 8:21 AM
max updated the diff for D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates.

Add flag_if_supported("-std=c++17") and rebased on a changes.

Aug 18 2022, 8:20 AM
max added a comment to D4861: [services] Backup - Add Rust.
In D4861#140927, @karol wrote:

Ok, once your diff is landed, I'm going to rebase to it and take your version removing mine, no problem. How about the rest of this diff?

Aug 18 2022, 7:44 AM
max requested changes to D4861: [services] Backup - Add Rust.
Aug 18 2022, 7:43 AM
max requested review of D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 18 2022, 7:32 AM
max added a comment to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.

This might be hard for the docker environment as cmake_path is a very recent addition.

Aug 18 2022, 7:27 AM
max planned changes to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 18 2022, 7:23 AM
max updated the diff for D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
  • Changes to use get_filename_component instead of cmake_path to support current CMake version.
  • Fixing cmake-lint errors.
  • Docstring were added to the function declarations.
Aug 18 2022, 7:23 AM

Aug 17 2022

max added a comment to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
In D4805#140773, @jon wrote:

It could be even easier using of the cmake_path function. We can remove this function completely in a favor of using just one line command.

This might be hard for the docker environment as cmake_path is a very recent addition.

Aug 17 2022, 9:21 AM
max planned changes to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 17 2022, 9:18 AM
max added inline comments to D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.
Aug 17 2022, 7:25 AM
max added a comment to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.

Variable names should be fixed according to our new CMake Lint to address errors but seems this doesn't block the review.

Aug 17 2022, 7:19 AM
max updated the summary of D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 17 2022, 7:10 AM
max added a comment to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.

Adding @jon and @varun as blocking reviewers, because of this cmake file can be used in all services.

Aug 17 2022, 7:09 AM
max updated the summary of D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 17 2022, 7:05 AM
max added 2 blocking reviewer(s) for D4805: [services] Add CMake file with functions for Corrosion and CXX integration: jon, varun.
Aug 17 2022, 7:05 AM
max added inline comments to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 17 2022, 7:04 AM
max updated the diff for D4805: [services] Add CMake file with functions for Corrosion and CXX integration.

Removing of _get_stem_name_of_path function in a favor of just use of cmake_path.

Aug 17 2022, 7:01 AM
max requested changes to D4861: [services] Backup - Add Rust.

Please take a look at D4805, the diff is to add corrosion_cxx.cmake with the modifications for our needs instead of just copy pasting the rusty_cmake cmake file:

  • Windows-related code was removed.
  • Automatically detect Rust target architecture using detect_cargo_target_architecture function.
  • Unnecessary comments were removed.
Aug 17 2022, 5:13 AM
max accepted D4860: [services] Tunnelbroker - Move install corrosion script to lib.

This diff shouldn't depend on D4859 and D4858. Seems that it's independent and the Tunnelbroker is successfully built without the parent diffs.

Aug 17 2022, 4:11 AM
max added inline comments to D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.
Aug 17 2022, 3:45 AM

Aug 16 2022

max planned changes to D4841: [services] Tunnelbroker - Add the ability to change the default config files directory to run in Nix.
Aug 16 2022, 12:35 PM
max planned changes to D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.
Aug 16 2022, 12:35 PM
max added inline comments to D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.
Aug 16 2022, 11:18 AM
max updated the diff for D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.

Joining message sending threads at the end of the test execution.

Aug 16 2022, 11:14 AM
max added inline comments to D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.
Aug 16 2022, 5:50 AM
max updated the diff for D4768: [services] Tunnelbroker - Amqp Manager in parallel threads messages throughput test.

Remove threads joining.

Aug 16 2022, 5:45 AM
max closed D4804: [services] Tunnelbroker - Update Cargo dependencies with the Log crate.
Aug 16 2022, 3:02 AM
max committed rCOMM7fcdf68bed17: [services] Tunnelbroker - Update Cargo dependencies with the Log crate (authored by max).
[services] Tunnelbroker - Update Cargo dependencies with the Log crate
Aug 16 2022, 3:02 AM
max closed D4803: [services] Tunnelbroker - Update Cargo dependencies with the CXX.
Aug 16 2022, 3:01 AM
max committed rCOMM57cbac818e83: [services] Tunnelbroker - Update Cargo dependencies with the CXX (authored by max).
[services] Tunnelbroker - Update Cargo dependencies with the CXX
Aug 16 2022, 3:01 AM
max added a comment to D4842: [services] Tunnelbroker - Add toolchain version to rustup.
In D4842#139958, @jon wrote:

What problem does this solve?

Aug 16 2022, 2:52 AM

Aug 15 2022

max updated the summary of D4842: [services] Tunnelbroker - Add toolchain version to rustup.
Aug 15 2022, 5:04 PM
max published D4842: [services] Tunnelbroker - Add toolchain version to rustup for review.
Aug 15 2022, 5:03 PM
max published D4841: [services] Tunnelbroker - Add the ability to change the default config files directory to run in Nix for review.

Keyserver build error is not related to these changes.

Aug 15 2022, 4:54 PM
max planned changes to D4805: [services] Add CMake file with functions for Corrosion and CXX integration.
Aug 15 2022, 7:44 AM
max planned changes to D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates.
Aug 15 2022, 7:44 AM
max requested review of D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.

Thanks, @tomek, and @karol for the comments! I'll try to describe this case further...

Aug 15 2022, 5:36 AM

Aug 12 2022

max requested review of D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.

Requesting review for @tomek comments.

Aug 12 2022, 7:22 AM
max planned changes to D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 12 2022, 5:13 AM
max added inline comments to D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 12 2022, 1:16 AM
max added a reviewer for D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper: jon.
Aug 12 2022, 1:14 AM
max updated the diff for D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates.

Rebase on parent changes.

Aug 12 2022, 1:13 AM
max updated the diff for D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.

Remove old corrosion integration.

Aug 12 2022, 1:08 AM
max planned changes to D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 12 2022, 1:05 AM
max requested review of D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 12 2022, 1:04 AM
max updated the test plan for D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 12 2022, 1:00 AM
max updated the test plan for D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 12 2022, 12:59 AM
max planned changes to D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 12 2022, 12:55 AM
max updated the diff for D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.

Changes to use log->error and info. Fix indentation.

Aug 12 2022, 12:55 AM
max published D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates for review.
Aug 12 2022, 12:30 AM
max published D4805: [services] Add CMake file with functions for Corrosion and CXX integration for review.
Aug 12 2022, 12:30 AM

Aug 11 2022

max requested review of D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.
Aug 11 2022, 7:52 AM
max added a comment to D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.
In D4740#137928, @tomek wrote:

I've seen @karol had some comments about detach in another diff, so adding him as blocking.
Other than that, it looks like the code is now a lot safer. As you noticed, the reason behind my comment was to protect against initialization not being safe and not the usage of the manager itself.

According to the description of this diff (this is a follow-up for the current using approach):

Creating init() function following the existing approach that AWS-CPP client already uses. We are callinginit() to initialize AWS thread/client.

I don't think that following all the approaches is a good idea - we need to be sure that other approaches aren't better. In this case, is there anything wrong with moving this logic to the constructor? Doing that would simplify this significantly, as exactly once semantic would be basically free.

Aug 11 2022, 7:19 AM
max requested review of D4740: [services] Tunnelbroker - Wrap `connect()` into `init()` in AmqpManager.
Aug 11 2022, 7:18 AM
max added a comment to D4767: [services] Tunnelbroker - Add AMQP shared channel locking.
In D4767#138735, @tomek wrote:

This degrades performance but in a stress test, in D4768 it shows that we have enough throughput of nearly 2000 messages per second during send/receive in this blocking model.

the current performance looks ok for our needs at the moment.

What is the estimate for the throughput we should be able to handle?

Aug 11 2022, 6:52 AM
max added a reviewer for D4803: [services] Tunnelbroker - Update Cargo dependencies with the CXX: jon.
Aug 11 2022, 4:24 AM
max added a reviewer for D4804: [services] Tunnelbroker - Update Cargo dependencies with the Log crate: jon.
Aug 11 2022, 4:24 AM
max published D4804: [services] Tunnelbroker - Update Cargo dependencies with the Log crate for review.
Aug 11 2022, 4:23 AM
max published D4803: [services] Tunnelbroker - Update Cargo dependencies with the CXX for review.
Aug 11 2022, 4:21 AM
max planned changes to D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.
Aug 11 2022, 4:01 AM
max updated the diff for D4540: [services] Tunnelbroker - Rust APNS push notifications A2 library wrapper.

Updating with the CXX instead of unsafe.

Aug 11 2022, 4:01 AM
max accepted D4774: [CMake] Generate protobuf headers as part of build.

I've removed the local protoc using the homebrew uninstall protobuf and it works as expected. Seems that this is related to the ENG-1590 issue and interference with the locally installed dev tools and not related to this certain diff.

Aug 11 2022, 2:30 AM
max requested changes to D4774: [CMake] Generate protobuf headers as part of build.

I got a protoc version mismatch when building services in a nix develop when testing this diff:

nix develop
cd services/backup
rm -dfr build
cmake -B build . && make -C build -j4

The errors are:

make[2]: Leaving directory '/Users/max/GitHub/comm/services/backup/build'
make[2]: Entering directory '/Users/max/GitHub/comm/services/backup/build'
make[2]: Leaving directory '/Users/max/GitHub/comm/services/backup/build'
make[2]: Entering directory '/Users/max/GitHub/comm/services/backup/build'
[ 20%] Building CXX object protos/CMakeFiles/comm-backup-grpc.dir/backup.pb.cc.o
[ 24%] Building CXX object protos/CMakeFiles/comm-blob-grpc.dir/blob.pb.cc.o
In file included from /Users/max/GitHub/comm/services/backup/build/protos/backup.pb.cc:4:
/Users/max/GitHub/comm/services/backup/build/protos/backup.pb.h:17:2: error: This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
 ^
/Users/max/GitHub/comm/services/backup/build/protos/backup.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
 ^
Aug 11 2022, 12:49 AM
max closed D4753: [services] Tunnelbroker - Change RabbitMQ queue name for a sandbox mode.
Aug 11 2022, 12:32 AM
max committed rCOMM0aa684380275: [services] Tunnelbroker - Change RabbitMQ queue name for a sandbox mode (authored by max).
[services] Tunnelbroker - Change RabbitMQ queue name for a sandbox mode
Aug 11 2022, 12:32 AM
max added inline comments to D4753: [services] Tunnelbroker - Change RabbitMQ queue name for a sandbox mode.
Aug 11 2022, 12:31 AM
max closed D4769: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID`.
Aug 11 2022, 12:30 AM
max committed rCOMM0b2320642c5f: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or… (authored by max).
[services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or…
Aug 11 2022, 12:30 AM

Aug 10 2022

max retitled D4769: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID` from [services] Tunnelbroker - Remove all logs connected to `userID` or `deviceID` to [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID`.
Aug 10 2022, 4:45 PM
max updated the diff for D4769: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID`.

Remove all logs with the userID, deviceID or sessionID.

Aug 10 2022, 4:44 PM
max accepted D4782: [Services] Fix tunnelbroker ctest usage.

Seems that this should be fixed from the tunnelbroker side to run it in a nix:

Unfortunately, the logic for finding the tunnelbroker.ini file still
assumes docker-only paths

I have created a task for it as ENG-1589.

Aug 10 2022, 3:28 PM
max added a comment to D4789: [android] Parallelize `GitModules.groovy:cloneSubmodules`.
In D4789#138353, @atul wrote:

Going to abandon this, it didn't have the effect on build times that I thought it would.

Aug 10 2022, 7:59 AM
max planned changes to D4769: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID`.
Aug 10 2022, 7:51 AM
max retitled D4769: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID` from [services] Tunnelbroker - Remove log on every new message to [services] Tunnelbroker - Remove all logs connected to `userID` or `deviceID`.
Aug 10 2022, 7:51 AM
max added a comment to D4769: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID`.

Any time we are printing something like deviceID, we should be EXTREMELY careful not to enable that in production. I'd be more comfortable if we simply did not have log statements that print things like deviceID and userID in checked-in code.

Aug 10 2022, 7:26 AM
max added a comment to D4769: [services] Tunnelbroker - Remove all logs connected to `userID`, `deviceID` or `sessionID`.
In D4769#138306, @tomek wrote:

I was thinking about this too, but to use debug we should rebuild the server from production mode.

It would be great if we could change the log level while the server is running, but that has some disadvantages. But having to rebuild in order to change log level sounds like a mistake and we should be able to do that - can we start supporting it?

Aug 10 2022, 7:05 AM
max added inline comments to D4767: [services] Tunnelbroker - Add AMQP shared channel locking.
Aug 10 2022, 6:02 AM
max updated the diff for D4767: [services] Tunnelbroker - Add AMQP shared channel locking.

Change to curly braces initialization.

Aug 10 2022, 6:02 AM
max added a comment to D4767: [services] Tunnelbroker - Add AMQP shared channel locking.
In D4767#138286, @tomek wrote:

This diff introduces the use of C++17 std::scoped_lock

Does our compilation process support C++17?

Aug 10 2022, 5:58 AM
max added a comment to D4767: [services] Tunnelbroker - Add AMQP shared channel locking.
In D4767#138282, @tomek wrote:

I'm slightly confused now. After this diff we can access the amqpChannel only from a single thread at a time. Is it going to degrade the performance? If the channel has to be accessed only from a single thread, maybe we should make it thread local and have an instance for each thread?

Aug 10 2022, 5:57 AM

Aug 9 2022

max accepted D4781: [Nix] Expose gtest for services tests.
Aug 9 2022, 12:43 PM
max planned changes to D4749: [services] Tunnelbroker - Add timeout for a pop message waiting in AmqpManager tests.
Aug 9 2022, 12:37 PM
max added a comment to D4766: [Services] Update tunnelbroker CMake to be MacOS compatible.

That's awesome! Thanks, @jon 🥳
Finally, I don't need to rebase my fork to get an instant build and IDE support ))

Aug 9 2022, 4:07 AM

Aug 8 2022

max added a comment to D4052: [services] Tunnelbroker - Fix scripts in Dockerfiles.

Raising this diff because D4751 was created as a duplicate and we need to fix this in a Tunnelbroker to run the tests from the CI.
We already have the same lines in a backup and blob Docker files. It's tested and works as expected.
This is an old diff and from that time @ashoat needs to be removed from reviewers and I think @tomek should be as blocking or I can commandeer this diff.

Aug 8 2022, 12:05 PM