From c8bbddd5e55412c1b1319677e457d8175d6e78ab Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 11 Mar 2023 21:21:40 +0100 Subject: 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 Reviewed-by: raitobezarius Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/store/Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'tvix/store/Cargo.toml') diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml index ac495b63b8..793c75a9d8 100644 --- a/tvix/store/Cargo.toml +++ b/tvix/store/Cargo.toml @@ -26,6 +26,7 @@ tonic = "0.8.2" tracing = "0.1.37" tracing-subscriber = { version = "0.3.16", features = ["json"] } walkdir = "2.3.2" +tokio-util = { version = "0.7.7", features = ["io", "io-util"] } [dependencies.tonic-reflection] optional = true -- cgit 1.4.1