summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common/execution_api.hpp
diff options
context:
space:
mode:
authorSascha Roloff <sascha.roloff@huawei.com>2023-11-17 10:22:25 +0100
committerSascha Roloff <sascha.roloff@huawei.com>2023-11-22 16:18:17 +0100
commit3b1095f7e3584f37c984a79ad7a2b94ebaa0700f (patch)
tree517f1113d4a19215b6403d38cc07a26a47c3090c /src/buildtool/execution_api/common/execution_api.hpp
parent44a7c680289ba6812583746013f350d63942c894 (diff)
downloadjustbuild-3b1095f7e3584f37c984a79ad7a2b94ebaa0700f.tar.gz
Implement blob splitting protocol on just client side
Diffstat (limited to 'src/buildtool/execution_api/common/execution_api.hpp')
-rw-r--r--src/buildtool/execution_api/common/execution_api.hpp9
1 files changed, 7 insertions, 2 deletions
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<Artifact::ObjectInfo> const& artifacts_info,
gsl::not_null<IExecutionApi*> 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<std::string> = 0;
/// \brief Upload blobs to CAS. Uploads only the blobs that are not yet