mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
limit the logs about rescheduling
This commit is contained in:
parent
5b9c74b4b8
commit
b539d999cd
@ -837,6 +837,7 @@ DatabaseCatalog::DatabaseCatalog(ContextMutablePtr global_context_)
|
||||
, loading_dependencies{"LoadingDeps"}
|
||||
, view_dependencies{"ViewDeps"}
|
||||
, log(getLogger("DatabaseCatalog"))
|
||||
, limitedLog(std::make_shared<LogSeriesLimiter>(log, 1, 5))
|
||||
, first_async_drop_in_queue(tables_marked_dropped.end())
|
||||
{
|
||||
}
|
||||
@ -1273,7 +1274,7 @@ void DatabaseCatalog::rescheduleDropTableTask()
|
||||
if (first_async_drop_in_queue != tables_marked_dropped.begin())
|
||||
{
|
||||
LOG_TRACE(
|
||||
log,
|
||||
limitedLog,
|
||||
"Have {} tables in queue to drop. Some of them are being dropped in sync mode. Schedule background task ASAP",
|
||||
tables_marked_dropped.size());
|
||||
(*drop_task)->scheduleAfter(0);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <Parsers/IAST_fwd.h>
|
||||
#include <Storages/IStorage_fwd.h>
|
||||
#include <Common/SharedMutex.h>
|
||||
#include <Common/logger_useful.h>
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <Poco/Logger.h>
|
||||
@ -325,6 +326,7 @@ private:
|
||||
TablesDependencyGraph view_dependencies TSA_GUARDED_BY(databases_mutex);
|
||||
|
||||
LoggerPtr log;
|
||||
LogSeriesLimiterPtr limitedLog;
|
||||
|
||||
std::atomic_bool is_shutting_down = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user