mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
fix shutdown for PeriodicLog
This commit is contained in:
parent
00aa60ca03
commit
a9e793532a
@ -1,6 +1,7 @@
|
||||
#include <Interpreters/PeriodicLog.h>
|
||||
#include <Interpreters/ErrorLog.h>
|
||||
#include <Interpreters/MetricLog.h>
|
||||
#include "Functions/DateTimeTransforms.h"
|
||||
|
||||
namespace DB
|
||||
{
|
||||
@ -27,7 +28,7 @@ template <typename LogElement>
|
||||
void PeriodicLog<LogElement>::shutdown()
|
||||
{
|
||||
stopCollect();
|
||||
this->stopFlushThread();
|
||||
Base::shutdown();
|
||||
}
|
||||
|
||||
template <typename LogElement>
|
||||
|
@ -17,6 +17,7 @@ template <typename LogElement>
|
||||
class PeriodicLog : public SystemLog<LogElement>
|
||||
{
|
||||
using SystemLog<LogElement>::SystemLog;
|
||||
using Base = SystemLog<LogElement>;
|
||||
|
||||
public:
|
||||
using TimePoint = std::chrono::system_clock::time_point;
|
||||
@ -24,12 +25,12 @@ public:
|
||||
/// Launches a background thread to collect metrics with interval
|
||||
void startCollect(size_t collect_interval_milliseconds_);
|
||||
|
||||
/// Stop background thread
|
||||
void stopCollect();
|
||||
|
||||
void shutdown() final;
|
||||
|
||||
protected:
|
||||
/// Stop background thread
|
||||
void stopCollect();
|
||||
|
||||
virtual void stepFunction(TimePoint current_time) = 0;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user