Page MenuHomePhabricator

[services] Backup - Rust lib - Add process
ClosedPublic

Authored by karol on Aug 18 2022, 4:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 18, 11:28 AM
Unknown Object (File)
Tue, Jun 18, 11:28 AM
Unknown Object (File)
Tue, Jun 18, 11:28 AM
Unknown Object (File)
Tue, Jun 18, 11:28 AM
Unknown Object (File)
Sat, Jun 15, 12:08 AM
Unknown Object (File)
Thu, Jun 13, 4:02 AM
Unknown Object (File)
Wed, Jun 12, 1:48 PM
Unknown Object (File)
May 8 2024, 12:57 AM

Details

Summary

Depends on D4867

Adding function to schedule data in the thread-safe queue in rust to be called from the c++.

The goal here is to:

  • spawn a thread in rust that will listen on a thread-safe queue (initialize)
  • schedule some data on this queue (process)
  • gracefully exit the thread and release all resources (terminate)

Later on, in the spawned thread, we will connect to the blob service through the gRPC, but first things first.

I'm probably going to remove all logging before landing, I'm leaving it as is for now.

Test Plan

test plan in D4870

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 18 2022, 4:32 AM
Harbormaster failed remote builds in B11437: Diff 15732!
karol edited the summary of this revision. (Show Details)

Requesting review for the same reason as in https://phab.comm.dev/D4861#140658

karol edited the test plan for this revision. (Show Details)

update

tomek added inline comments.
services/backup/rust_lib/src/lib.rs
66 ↗(On Diff #15781)

Using str as a name sounds confusing. Can we use a name that isn't also a type name?

69 ↗(On Diff #15781)

I guess we can remove this

70–74 ↗(On Diff #15781)

Does that mean that we can write only from one thread at a time? Doesn't sounds like an issue, just wanted to clarify.

This revision is now accepted and ready to land.Aug 24 2022, 3:46 AM

address comments

services/backup/rust_lib/src/lib.rs
66 ↗(On Diff #15781)

sure, whatever

69 ↗(On Diff #15781)

right

70–74 ↗(On Diff #15781)

yes