From b5a29ec0daf024fde9bd06f76cab8a12fd509aab Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 18 Jun 2024 15:46:56 +0200 Subject: Pass StorageConfig to GarbageCollector::SharedLock --- src/buildtool/execution_api/execution_service/bytestream_server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/execution_service/bytestream_server.cpp') diff --git a/src/buildtool/execution_api/execution_service/bytestream_server.cpp b/src/buildtool/execution_api/execution_service/bytestream_server.cpp index 92b06ef6..35ff221d 100644 --- a/src/buildtool/execution_api/execution_service/bytestream_server.cpp +++ b/src/buildtool/execution_api/execution_service/bytestream_server.cpp @@ -23,6 +23,7 @@ #include "src/buildtool/compatibility/native_support.hpp" #include "src/buildtool/execution_api/common/bytestream_common.hpp" #include "src/buildtool/logging/log_level.hpp" +#include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/garbage_collector.hpp" #include "src/utils/cpp/tmp_dir.hpp" #include "src/utils/cpp/verify_hash.hpp" @@ -61,7 +62,7 @@ auto BytestreamServiceImpl::Read( return ::grpc::Status{::grpc::StatusCode::INVALID_ARGUMENT, *error_msg}; } - auto lock = GarbageCollector::SharedLock(); + auto lock = GarbageCollector::SharedLock(StorageConfig::Instance()); if (!lock) { auto str = fmt::format("Could not acquire SharedLock"); logger_.Emit(LogLevel::Error, str); @@ -125,7 +126,7 @@ auto BytestreamServiceImpl::Write( *hash, request.write_offset(), request.finish_write()); - auto lock = GarbageCollector::SharedLock(); + auto lock = GarbageCollector::SharedLock(StorageConfig::Instance()); if (!lock) { auto str = fmt::format("Could not acquire SharedLock"); logger_.Emit(LogLevel::Error, str); -- cgit v1.2.3