int64_t size_change_kibibyte =
kibibyte_size_diff(cache_file.dir_entry, new_dir_entry);
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 ({})",
util::format_digest(key),
cache_file.path);
- increment_level_2_counters(
+ increment_files_and_size_counters(
key, -1, -static_cast<int64_t>(cache_file.dir_entry.size_on_disk() / 1024));
}
}
std::optional<core::StatisticsCounters>
-LocalStorage::increment_level_2_counters(const Hash::Digest& key,
- int64_t files,
- int64_t size_kibibyte)
+LocalStorage::increment_files_and_size_counters(const Hash::Digest& key,
+ int64_t files,
+ int64_t size_kibibyte)
{
uint8_t l1_index = key[0] >> 4;
uint8_t l2_index = key[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 Hash::Digest& key, int64_t files, int64_t size_kibibyte);
void perform_automatic_cleanup();