Merge pull request #49206 from kssenii/fix-after-49110

Fix after #49110
This commit is contained in:
Kseniia Sumarokova 2023-04-26 22:20:31 +02:00 committed by GitHub
commit 55c10b9527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -1154,7 +1154,7 @@ void FileCache::reduceSizeToDownloaded(
chassert(cell->queue_iterator);
chassert(cell->queue_iterator->size() >= downloaded_size);
const ssize_t diff = cell->queue_iterator->size() - downloaded_size;
const int64_t diff = cell->queue_iterator->size() - downloaded_size;
if (diff > 0)
cell->queue_iterator->updateSize(-diff, cache_lock);

View File

@ -61,7 +61,7 @@ public:
/// the iterator should automatically point to the next record.
virtual void removeAndGetNext(std::lock_guard<std::mutex> &) = 0;
virtual void updateSize(ssize_t, std::lock_guard<std::mutex> &) = 0;
virtual void updateSize(int64_t, std::lock_guard<std::mutex> &) = 0;
};
public:

View File

@ -94,7 +94,7 @@ void LRUFileCachePriority::LRUFileCacheIterator::removeAndGetNext(std::lock_guar
queue_iter = cache_priority->queue.erase(queue_iter);
}
void LRUFileCachePriority::LRUFileCacheIterator::updateSize(ssize_t size, std::lock_guard<std::mutex> &)
void LRUFileCachePriority::LRUFileCacheIterator::updateSize(int64_t size, std::lock_guard<std::mutex> &)
{
cache_priority->cache_size += size;

View File

@ -54,7 +54,7 @@ public:
void removeAndGetNext(std::lock_guard<std::mutex> &) override;
void updateSize(ssize_t size, std::lock_guard<std::mutex> &) override;
void updateSize(int64_t size, std::lock_guard<std::mutex> &) override;
void use(std::lock_guard<std::mutex> &) override;