mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Setting the metric FilesystemCacheSizeLimit in LRUFileCachePriority.h
This commit is contained in:
parent
f9d310c77e
commit
5fa45bdbea
@ -5,6 +5,12 @@
|
||||
#include <Interpreters/Cache/FileCacheKey.h>
|
||||
#include <Common/logger_useful.h>
|
||||
|
||||
namespace CurrentMetrics
|
||||
{
|
||||
extern const Metric FilesystemCacheSizeLimit;
|
||||
}
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
@ -18,7 +24,9 @@ private:
|
||||
using LRUQueueIterator = typename LRUQueue::iterator;
|
||||
|
||||
public:
|
||||
LRUFileCachePriority(size_t max_size_, size_t max_elements_) : IFileCachePriority(max_size_, max_elements_) {}
|
||||
LRUFileCachePriority(size_t max_size_, size_t max_elements_) : IFileCachePriority(max_size_, max_elements_) {
|
||||
CurrentMetrics::set(CurrentMetrics::FilesystemCacheSizeLimit, max_size_);
|
||||
}
|
||||
|
||||
size_t getSize(const CacheGuard::Lock &) const override { return current_size; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user