From fd432a3ee41f49fc0495057821cc3ed3ff486732 Mon Sep 17 00:00:00 2001 From: kssenii Date: Wed, 26 Apr 2023 17:54:10 +0200 Subject: [PATCH] Fix --- src/Interpreters/Cache/FileCache.cpp | 2 +- src/Interpreters/Cache/IFileCachePriority.h | 2 +- src/Interpreters/Cache/LRUFileCachePriority.cpp | 2 +- src/Interpreters/Cache/LRUFileCachePriority.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Interpreters/Cache/FileCache.cpp b/src/Interpreters/Cache/FileCache.cpp index 046e388430f..81ea5762609 100644 --- a/src/Interpreters/Cache/FileCache.cpp +++ b/src/Interpreters/Cache/FileCache.cpp @@ -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); diff --git a/src/Interpreters/Cache/IFileCachePriority.h b/src/Interpreters/Cache/IFileCachePriority.h index af73fadebbf..94ec34132c3 100644 --- a/src/Interpreters/Cache/IFileCachePriority.h +++ b/src/Interpreters/Cache/IFileCachePriority.h @@ -61,7 +61,7 @@ public: /// the iterator should automatically point to the next record. virtual void removeAndGetNext(std::lock_guard &) = 0; - virtual void updateSize(ssize_t, std::lock_guard &) = 0; + virtual void updateSize(int64_t, std::lock_guard &) = 0; }; public: diff --git a/src/Interpreters/Cache/LRUFileCachePriority.cpp b/src/Interpreters/Cache/LRUFileCachePriority.cpp index 5623b8443f7..b54eebffcc4 100644 --- a/src/Interpreters/Cache/LRUFileCachePriority.cpp +++ b/src/Interpreters/Cache/LRUFileCachePriority.cpp @@ -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 &) +void LRUFileCachePriority::LRUFileCacheIterator::updateSize(int64_t size, std::lock_guard &) { cache_priority->cache_size += size; diff --git a/src/Interpreters/Cache/LRUFileCachePriority.h b/src/Interpreters/Cache/LRUFileCachePriority.h index 949e83c2a28..77d28f18f61 100644 --- a/src/Interpreters/Cache/LRUFileCachePriority.h +++ b/src/Interpreters/Cache/LRUFileCachePriority.h @@ -54,7 +54,7 @@ public: void removeAndGetNext(std::lock_guard &) override; - void updateSize(ssize_t size, std::lock_guard &) override; + void updateSize(int64_t size, std::lock_guard &) override; void use(std::lock_guard &) override;