Add missing finalize

This commit is contained in:
kssenii 2024-03-13 10:53:57 +01:00
parent 632c6c0cb7
commit c8f6d6ada9
2 changed files with 4 additions and 0 deletions

View File

@ -70,11 +70,14 @@ void EvictionCandidates::finalize(FileCacheQueryLimit::QueryContext * query_cont
{
for (const auto & it : invalidated_queue_entries)
{
/// Remove entry from per query priority queue.
if (query_context)
{
const auto & entry = it->getEntry();
query_context->remove(entry->key, entry->offset, lock);
}
/// Remove entry from main priority queue.
it->remove(lock);
}

View File

@ -218,6 +218,7 @@ void SLRUFileCachePriority::increasePriority(SLRUIterator & iterator, const Cach
}
/// Make space for "downgrade" candidates.
eviction_candidates.evict();
eviction_candidates.finalize(nullptr, lock);
}
/// All checks passed, now we can move downgrade candidates to