int64_t size_change_kibibyte =
Util::size_change_kibibyte(cache_file.stat, new_stat);
auto counters =
- increment_level_2_counters(key, files_change, size_change_kibibyte);
+ increment_files_and_size_counters(key, files_change, size_change_kibibyte);
l2_content_lock.release();
}
LOG("Removed {} from local storage ({})", key.to_string(), cache_file.path);
- increment_level_2_counters(
+ increment_files_and_size_counters(
key, -1, -static_cast<int64_t>(cache_file.stat.size_on_disk() / 1024));
}
}
std::optional<core::StatisticsCounters>
-LocalStorage::increment_level_2_counters(const Digest& key,
- int64_t files,
- int64_t size_kibibyte)
+LocalStorage::increment_files_and_size_counters(const Digest& key,
+ int64_t files,
+ int64_t size_kibibyte)
{
uint8_t l1_index = key.bytes()[0] >> 4;
uint8_t l2_index = key.bytes()[0] & 0xF;
void recount_level_1_dir(util::LongLivedLockFileManager& lock_manager,
uint8_t l1_index);
- std::optional<core::StatisticsCounters> increment_level_2_counters(
+ std::optional<core::StatisticsCounters> increment_files_and_size_counters(
const Digest& key, int64_t files, int64_t size_kibibyte);
void perform_automatic_cleanup();