fix cache size

This commit is contained in:
2024-12-24 21:23:06 -06:00
parent 9ebfb30871
commit 923e3be6a5
2 changed files with 3 additions and 1 deletions

View File

@ -185,9 +185,9 @@ auto file_manager::evict_file(const std::string &api_path) -> bool {
closeable_file = open_file_lookup_.at(api_path);
}
open_file_lookup_.erase(api_path);
auto allocated = closeable_file->get_allocated();
open_lock.unlock();
auto allocated = closeable_file->get_allocated();
closeable_file.reset();
auto removed = remove_source_and_shrink_cache(api_path, source_path, fsi.size,
allocated);

View File

@ -47,6 +47,8 @@ public:
MOCK_METHOD(boost::dynamic_bitset<>, get_read_state, (), (const, override));
MOCK_METHOD(bool, get_allocated, (), (const, override));
MOCK_METHOD(bool, get_read_state, (std::size_t chunk), (const, override));
MOCK_METHOD(std::string, get_source_path, (), (const, override));