diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-09 16:51:54 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-10 16:31:43 +0200 |
commit | 13211c140457b878ca8787b80b2ad2424f5272bd (patch) | |
tree | ed9402617bc7a681bf95cf584345565196eb5c6d /src/buildtool/execution_api/remote/bazel/bazel_api.hpp | |
parent | f162d4244f5a7a204f38a081de3731f1321689f4 (diff) | |
download | justbuild-13211c140457b878ca8787b80b2ad2424f5272bd.tar.gz |
ParallelRetrieveToCas: avoid duplicated requests
While no additional blob will be transferred, doing a request
for missing blobs is still a request and, in particular, an
unnecessary round trip. Therefore avoid this, by remembering what
we synchronized already.
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.hpp')
-rw-r--r-- | src/buildtool/execution_api/remote/bazel/bazel_api.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp index c9771ed7..8a0ddcf9 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp @@ -114,6 +114,14 @@ class BazelApi final : public IExecutionApi { private: std::shared_ptr<BazelNetwork> network_; + + [[nodiscard]] auto ParallelRetrieveToCasWithCache( + std::vector<Artifact::ObjectInfo> const& all_artifacts_info, + IExecutionApi const& api, + std::size_t jobs, + bool use_blob_splitting, + gsl::not_null<std::unordered_set<Artifact::ObjectInfo>*> done) + const noexcept -> bool; }; #endif // INCLUDED_SRC_BUILDTOOL_EXECUTION_API_REMOTE_BAZEL_BAZEL_API_HPP |