Page MenuHomePhabricator

[services] Backup - Blob Get Client - Add blocking read
ClosedPublic

Authored by karol on Sep 1 2022, 4:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 1:34 AM
Unknown Object (File)
Tue, Nov 12, 8:46 PM
Unknown Object (File)
Tue, Nov 12, 10:32 AM
Unknown Object (File)
Sun, Nov 10, 12:18 PM
Unknown Object (File)
Sun, Nov 10, 6:57 AM
Unknown Object (File)
Sun, Nov 3, 1:44 AM
Unknown Object (File)
Sun, Oct 27, 8:12 PM
Unknown Object (File)
Sun, Oct 27, 8:12 PM

Details

Summary

Depends on D5014

Adding blocking read function to the blob get client.

Test Plan

backup builds

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

jon requested changes to this revision.Sep 1 2022, 9:11 AM
jon added inline comments.
services/backup/blob_client/src/get_client.rs
131–137 ↗(On Diff #16175)

we pulled client out of the mutex guard, and now we are re-assigning it? why?

132–136 ↗(On Diff #16175)

This should be a similar way to express this.

This revision now requires changes to proceed.Sep 1 2022, 9:11 AM
services/backup/blob_client/src/get_client.rs
131–137 ↗(On Diff #16175)

Rust will not allow modifying struct members so we have to take() and re-put again.

132–136 ↗(On Diff #16175)

Yes, looks okay, nice catch, thanks!

tomek requested changes to this revision.Sep 5 2022, 5:37 AM
tomek added inline comments.
services/backup/blob_client/src/get_client.rs
131–137 ↗(On Diff #16175)

I'm not sure if this is correct in general. For example, you can use &mut reference...

135 ↗(On Diff #16175)

Is there a way to avoid mutating the data from outside this block? Can we use block_on return value for this?

tomek added inline comments.
services/backup/blob_client/src/get_client.rs
135 ↗(On Diff #16175)

Nice!

This revision is now accepted and ready to land.Sep 7 2022, 11:16 AM
This revision was landed with ongoing or failed builds.Sep 8 2022, 4:10 AM
This revision was automatically updated to reflect the committed changes.