From 3b1095f7e3584f37c984a79ad7a2b94ebaa0700f Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Fri, 17 Nov 2023 10:22:25 +0100 Subject: Implement blob splitting protocol on just client side --- src/buildtool/execution_api/common/execution_api.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/common/execution_api.hpp') diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index e30c1276..37abd5ea 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -89,17 +89,22 @@ class IExecutionApi { /// \brief A variant of RetrieveToCas that is allowed to internally use /// the specified number of threads to carry out the task in parallel. + /// Given it is supported by the server, blob splitting enables traffic + /// reduction when fetching blobs from the remote by reusing locally + /// available blob chunks and just fetching unknown blob chunks to assemble + /// the remote blobs. [[nodiscard]] virtual auto ParallelRetrieveToCas( std::vector const& artifacts_info, gsl::not_null const& api, - std::size_t /* jobs */) noexcept -> bool { + std::size_t /* jobs */, + bool /* use_blob_splitting */) noexcept -> bool { return RetrieveToCas(artifacts_info, api); } /// \brief Retrieve one artifact from CAS and make it available for /// furter in-memory processing [[nodiscard]] virtual auto RetrieveToMemory( - Artifact::ObjectInfo const& artifact_info) + Artifact::ObjectInfo const& artifact_info) noexcept -> std::optional = 0; /// \brief Upload blobs to CAS. Uploads only the blobs that are not yet -- cgit v1.2.3