fix
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2024-12-25 11:57:33 -06:00
parent 76a7b3eaf0
commit c4707c2cf7

View File

@ -129,7 +129,7 @@ auto open_file::adjust_cache_size(std::uint64_t file_size, bool shrink)
}
if (file_size > fsi_.size) {
auto size = file_size - file_size;
auto size = file_size - fsi_.size;
auto res = shrink ? cache_size_mgr::instance().shrink(size)
: cache_size_mgr::instance().expand(size);
if (res == api_error::success) {
@ -143,7 +143,7 @@ auto open_file::adjust_cache_size(std::uint64_t file_size, bool shrink)
return set_api_error(res);
}
auto size = fsi_.size = file_size;
auto size = fsi_.size - file_size;
auto res = shrink ? cache_size_mgr::instance().expand(size)
: cache_size_mgr::instance().shrink(size);
if (res == api_error::success) {