From 51f8b186803292f111011d04d5291deb374dc34c Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Thu, 6 Oct 2022 12:18:25 +0200 Subject: LocalTreeMap: Prevent tree objects from being stored ... to align with the original idea of caching a flat list of blob objects, without the need to recursively traverse any trees. Consequently, we cannot create any map entry in places where we do not have all sub-tree entries at hand (e.g., LocalAPI, BazelAPI, BazelResponse). --- src/buildtool/execution_api/local/local_storage.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/buildtool/execution_api/local/local_storage.hpp') diff --git a/src/buildtool/execution_api/local/local_storage.hpp b/src/buildtool/execution_api/local/local_storage.hpp index 4ffe2881..f9594218 100644 --- a/src/buildtool/execution_api/local/local_storage.hpp +++ b/src/buildtool/execution_api/local/local_storage.hpp @@ -12,10 +12,6 @@ class LocalStorage { public: - explicit LocalStorage( - std::shared_ptr tree_map = nullptr) noexcept - : tree_map_{std::move(tree_map)} {} - /// \brief Store blob from file path with x-bit determined from file system. template [[nodiscard]] auto StoreBlob(std::filesystem::path const& file_path) @@ -89,7 +85,7 @@ class LocalStorage { LocalCAS cas_exec_{}; LocalCAS cas_tree_{}; LocalAC ac_{&cas_file_}; - std::shared_ptr tree_map_; + mutable LocalTreeMap tree_map_; /// \brief Try to sync blob between file CAS and executable CAS. /// \param digest Blob digest. -- cgit v1.2.3