From 13211c140457b878ca8787b80b2ad2424f5272bd Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 9 Jul 2024 16:51:54 +0200 Subject: 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. --- src/buildtool/execution_api/remote/bazel/bazel_api.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.hpp') 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 network_; + + [[nodiscard]] auto ParallelRetrieveToCasWithCache( + std::vector const& all_artifacts_info, + IExecutionApi const& api, + std::size_t jobs, + bool use_blob_splitting, + gsl::not_null*> done) + const noexcept -> bool; }; #endif // INCLUDED_SRC_BUILDTOOL_EXECUTION_API_REMOTE_BAZEL_BAZEL_API_HPP -- cgit v1.2.3