Page MenuHomePhabricator

[services] Tunnelbroker - Disabling checking of the persisted messages on stream connect
ClosedPublic

Authored by max on Feb 6 2023, 2:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 9:19 PM
Unknown Object (File)
Sun, Apr 21, 9:19 PM
Unknown Object (File)
Sun, Apr 21, 9:19 PM
Unknown Object (File)
Sun, Apr 21, 9:18 PM
Unknown Object (File)
Sun, Apr 21, 9:15 PM
Unknown Object (File)
Mar 20 2024, 4:29 PM
Unknown Object (File)
Mar 20 2024, 4:29 PM
Unknown Object (File)
Mar 20 2024, 4:29 PM
Subscribers

Details

Summary

This diff introduces changes to the Tunnelbroker gRPC messages stream implementation according to the ENG-2641 task, where we need to disable messages persistence in the DynamoDB database using the config file parameter from D6622.
In this diff, we are disabling the check for new messages in the database when the client connects to the stream if the config flag (D6622) is presented.

Linear task: ENG-2641

Test Plan
  1. CI gates are passed.
  2. Manual testing: The client connects to the gRPC messages stream when messages exist for a certain deviceID in the DynamoDB database. When the messages.skip_persistence config flag has presented the messages from the database will not be delivered to the stream, because we are skipping looks into the database for them.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max edited the test plan for this revision. (Show Details)
max added a reviewer: bartek.
max published this revision for review.Feb 6 2023, 5:45 AM
services/tunnelbroker/src/server/mod.rs
213 ↗(On Diff #22119)

Is there any way to reference ConfigManager::OPTION_MESSAGES_SKIP_PERSISTENCE ? would like to avoid stringly typed items.

services/tunnelbroker/src/server/mod.rs
213 ↗(On Diff #22119)

this could possibly be done with the CxxString type, but it would probably be less performant

Most of my concerns will be a non-issue if we every write the cli parsing in rust.

This revision is now accepted and ready to land.Feb 20 2023, 12:20 PM
max added inline comments.
services/tunnelbroker/src/server/mod.rs
213 ↗(On Diff #22119)

Is there any way to reference ConfigManager::OPTION_MESSAGES_SKIP_PERSISTENCE ? would like to avoid stringly typed items.

We can only pass it from the legacy C++ codebase using the CXX bridge, but this seems like less performant and more code to support the solution especially since we will rewrite all C++ to Rust in the future.

this could possibly be done with the CxxString type, but it would probably be less performant

Absolutely correct!

max marked an inline comment as done.

Rebasing on master.