diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-18 15:46:56 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 12:58:35 +0200 |
commit | b5a29ec0daf024fde9bd06f76cab8a12fd509aab (patch) | |
tree | b1786fc20a5033aa6789ab37b916e072c4d3937a /src/buildtool/execution_api/execution_service/bytestream_server.cpp | |
parent | c88585ddf9386fb14154a4f3baa702569d55584a (diff) | |
download | justbuild-b5a29ec0daf024fde9bd06f76cab8a12fd509aab.tar.gz |
Pass StorageConfig to GarbageCollector::SharedLock
Diffstat (limited to 'src/buildtool/execution_api/execution_service/bytestream_server.cpp')
-rw-r--r-- | src/buildtool/execution_api/execution_service/bytestream_server.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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); |