mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-24 02:30:51 +00:00
Added a metric for the number of files to send in Distributed tables
This commit is contained in:
parent
a7fa71aaf1
commit
6bbf3bd634
@ -49,6 +49,7 @@
|
||||
M(GlobalThreadActive, "Number of threads in global thread pool running a task.") \
|
||||
M(LocalThread, "Number of threads in local thread pools. Should be similar to GlobalThreadActive.") \
|
||||
M(LocalThreadActive, "Number of threads in local thread pools running a task.") \
|
||||
M(DistributedFilesToInsert, "Number of pending files to process for asynchronous insertion into Distributed tables. Number of files for every shard is summed.") \
|
||||
|
||||
|
||||
namespace CurrentMetrics
|
||||
|
@ -23,6 +23,7 @@
|
||||
namespace CurrentMetrics
|
||||
{
|
||||
extern const Metric DistributedSend;
|
||||
extern const Metric DistributedFilesToInsert;
|
||||
}
|
||||
|
||||
namespace DB
|
||||
@ -209,6 +210,8 @@ bool StorageDistributedDirectoryMonitor::processFiles()
|
||||
if (files.empty())
|
||||
return false;
|
||||
|
||||
CurrentMetrics::Increment metric_increment{CurrentMetrics::DistributedFilesToInsert, CurrentMetrics::Value(files.size())};
|
||||
|
||||
if (should_batch_inserts)
|
||||
{
|
||||
processFilesWithBatching(files);
|
||||
|
Loading…
Reference in New Issue
Block a user