refactor(tvix/store): use read_all_and_chunk in gRPC blobservice
This was the last piece of code using BlobWriter. We can also use `read_all_and_chunk`, it's just requires a bit more plumbing: - The data coming from the client (stream) needs to be mapped (we extract the .data field). - The stream needs to be turned into an (async) reader - The reader needs to be made sync, and that code using the sync reader needs to be in a `task::spawn_blocking`. Change-Id: I4e374e1a9f47d5a0933f59a8f5c121185a5f3e95 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8260 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
7ffb2676ee
commit
c8bbddd5e5
4 changed files with 49 additions and 39 deletions
|
@ -7004,9 +7004,9 @@ rec {
|
|||
};
|
||||
"tokio-util" = rec {
|
||||
crateName = "tokio-util";
|
||||
version = "0.7.4";
|
||||
version = "0.7.7";
|
||||
edition = "2018";
|
||||
sha256 = "0h67jb56bsxy4pi1a41pda8d52569ci5clvqv3c6cg9vy1sy1chb";
|
||||
sha256 = "1cp6yx4789j6gvbp4xnbk7lpd7q0j2a2qd4g1pg2b4q0afadh9sl";
|
||||
authors = [
|
||||
"Tokio Contributors <team@tokio.rs>"
|
||||
];
|
||||
|
@ -7062,7 +7062,7 @@ rec {
|
|||
"time" = [ "tokio/time" "slab" ];
|
||||
"tracing" = [ "dep:tracing" ];
|
||||
};
|
||||
resolvedDefaultFeatures = [ "codec" "default" "tracing" ];
|
||||
resolvedDefaultFeatures = [ "codec" "default" "io" "io-util" "tracing" ];
|
||||
};
|
||||
"toml" = rec {
|
||||
crateName = "toml";
|
||||
|
@ -8356,6 +8356,11 @@ rec {
|
|||
name = "tokio-stream";
|
||||
packageId = "tokio-stream";
|
||||
}
|
||||
{
|
||||
name = "tokio-util";
|
||||
packageId = "tokio-util";
|
||||
features = [ "io" "io-util" ];
|
||||
}
|
||||
{
|
||||
name = "tonic";
|
||||
packageId = "tonic";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue