continue fixes for dead-lock when max cache size is reached
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@ -56,7 +56,9 @@ auto cache_size_mgr::expand(std::uint64_t size, bool should_wait) -> api_error {
|
||||
|
||||
auto max_cache_size = cfg_->get_max_cache_size_bytes();
|
||||
|
||||
while (not stop_requested_ && cache_size_ > max_cache_size) {
|
||||
auto cache_dir = utils::file::directory{cfg_->get_cache_directory()};
|
||||
while (not stop_requested_ && cache_size_ > max_cache_size &&
|
||||
cache_dir.count() > 1U) {
|
||||
event_system::instance().raise<max_cache_size_reached>(cache_size_,
|
||||
max_cache_size);
|
||||
if (not should_wait) {
|
||||
|
Reference in New Issue
Block a user