mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Add more logging
This commit is contained in:
parent
b1e03abc1f
commit
87b1e0ead2
@ -37,6 +37,7 @@ LRUFileCachePriority::LRUFileCachePriority(
|
|||||||
const std::string & description_)
|
const std::string & description_)
|
||||||
: IFileCachePriority(max_size_, max_elements_)
|
: IFileCachePriority(max_size_, max_elements_)
|
||||||
, description(description_)
|
, description(description_)
|
||||||
|
, log(getLogger("LRUFileCachePriority{}" + (description.empty() ? "" : "(" + description + ")")))
|
||||||
{
|
{
|
||||||
if (state_)
|
if (state_)
|
||||||
state = state_;
|
state = state_;
|
||||||
|
@ -86,7 +86,7 @@ private:
|
|||||||
|
|
||||||
LRUQueue queue;
|
LRUQueue queue;
|
||||||
const std::string description;
|
const std::string description;
|
||||||
LoggerPtr log = getLogger("LRUFileCachePriority");
|
LoggerPtr log;
|
||||||
StatePtr state;
|
StatePtr state;
|
||||||
|
|
||||||
void updateElementsCount(int64_t num);
|
void updateElementsCount(int64_t num);
|
||||||
|
@ -215,7 +215,16 @@ bool SLRUFileCachePriority::collectCandidatesForEviction(
|
|||||||
|
|
||||||
hold_space = std::make_shared<HoldSpace>(
|
hold_space = std::make_shared<HoldSpace>(
|
||||||
hold_size, hold_elements, QueueEntryType::SLRU_Probationary, probationary_queue, lock);
|
hold_size, hold_elements, QueueEntryType::SLRU_Probationary, probationary_queue, lock);
|
||||||
|
|
||||||
|
LOG_TEST(log, "Eviction candidates: {}, hold space: {} in size and {} in elements. {}",
|
||||||
|
res.size(), hold_size, hold_elements, getStateInfoForLog(lock));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG_TEST(log, "Eviction candidates: {}, hold space: none. {}",
|
||||||
|
res.size(), getStateInfoForLog(lock));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
auto downgrade_func = [=, this]
|
auto downgrade_func = [=, this]
|
||||||
(const CachePriorityGuard::Lock & lk)
|
(const CachePriorityGuard::Lock & lk)
|
||||||
|
Loading…
Reference in New Issue
Block a user