This commit is contained in:
kssenii 2023-05-09 22:51:47 +02:00
parent c20aa0786d
commit e35c669892
3 changed files with 4 additions and 3 deletions

View File

@ -753,7 +753,7 @@ bool FileSegment::assertCorrectnessUnlocked(const FileSegmentGuard::Lock &) cons
}
else
{
if (download_state == State::DOWNLOADED)
if (download_state == State::DOWNLOADING)
{
chassert(!downloader_id.empty());
}

View File

@ -87,7 +87,6 @@ LRUFileCachePriority::LRUQueueIterator LRUFileCachePriority::remove(LRUQueueIter
log, "Removed entry from LRU queue, key: {}, offset: {}, size: {}",
it->key, it->offset, it->size);
it->size = 0;
return queue.erase(it);
}

View File

@ -344,7 +344,9 @@ KeyMetadata::iterator LockedKey::removeFileSegment(size_t offset, const FileSegm
LOG_DEBUG(
log, "Remove from cache. Key: {}, offset: {}, size: {}",
getKey(), offset, file_segment->getReservedSize());
getKey(), offset, file_segment->reserved_size);
chassert(file_segment->assertCorrectnessUnlocked(segment_lock));
if (file_segment->queue_iterator)
file_segment->queue_iterator->annul();