mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Do not spam log in MergeJoinAlgorithm
This commit is contained in:
parent
bddf6c1b32
commit
fa59133463
@ -855,7 +855,7 @@ MergeJoinTransform::MergeJoinTransform(
|
|||||||
|
|
||||||
void MergeJoinTransform::onFinish()
|
void MergeJoinTransform::onFinish()
|
||||||
{
|
{
|
||||||
algorithm.logElapsed(total_stopwatch.elapsedSeconds(), true);
|
algorithm.logElapsed(total_stopwatch.elapsedSeconds());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -233,19 +233,14 @@ public:
|
|||||||
virtual void consume(Input & input, size_t source_num) override;
|
virtual void consume(Input & input, size_t source_num) override;
|
||||||
virtual Status merge() override;
|
virtual Status merge() override;
|
||||||
|
|
||||||
void logElapsed(double seconds, bool force)
|
void logElapsed(double seconds)
|
||||||
{
|
{
|
||||||
/// Do not log more frequently than once per ten seconds
|
|
||||||
if (seconds - stat.last_log_seconds < 10 && !force)
|
|
||||||
return;
|
|
||||||
|
|
||||||
LOG_TRACE(log,
|
LOG_TRACE(log,
|
||||||
"Finished pocessing in {} seconds"
|
"Finished pocessing in {} seconds"
|
||||||
", left: {} blocks, {} rows; right: {} blocks, {} rows"
|
", left: {} blocks, {} rows; right: {} blocks, {} rows"
|
||||||
", max blocks loaded to memory: {}",
|
", max blocks loaded to memory: {}",
|
||||||
seconds, stat.num_blocks[0], stat.num_rows[0], stat.num_blocks[1], stat.num_rows[1],
|
seconds, stat.num_blocks[0], stat.num_rows[0], stat.num_blocks[1], stat.num_rows[1],
|
||||||
stat.max_blocks_loaded);
|
stat.max_blocks_loaded);
|
||||||
stat.last_log_seconds = seconds;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -277,8 +272,6 @@ private:
|
|||||||
size_t num_rows[2] = {0, 0};
|
size_t num_rows[2] = {0, 0};
|
||||||
|
|
||||||
size_t max_blocks_loaded = 0;
|
size_t max_blocks_loaded = 0;
|
||||||
|
|
||||||
double last_log_seconds = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Statistic stat;
|
Statistic stat;
|
||||||
@ -303,12 +296,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void onFinish() override;
|
void onFinish() override;
|
||||||
|
|
||||||
void work() override
|
|
||||||
{
|
|
||||||
algorithm.logElapsed(total_stopwatch.elapsedSeconds(), true);
|
|
||||||
Base::work();
|
|
||||||
}
|
|
||||||
|
|
||||||
Poco::Logger * log;
|
Poco::Logger * log;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user