MCPcopy Create free account
hub / github.com/ByConity/ByConity / discoverTablePartitions

Method discoverTablePartitions

programs/copier/ClusterCopier.cpp:204–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void ClusterCopier::discoverTablePartitions(const ConnectionTimeouts & timeouts, TaskTable & task_table, UInt64 num_threads)
205{
206 /// Fetch partitions list from a shard
207 {
208 ThreadPool thread_pool(num_threads ? num_threads : 2 * getNumberOfPhysicalCPUCores());
209
210 for (const TaskShardPtr & task_shard : task_table.all_shards)
211 thread_pool.scheduleOrThrowOnError([this, timeouts, task_shard]()
212 {
213 setThreadName("DiscoverPartns");
214 discoverShardPartitions(timeouts, task_shard);
215 });
216
217 LOG_INFO(log, "Waiting for {} setup jobs", thread_pool.active());
218 thread_pool.wait();
219 }
220}
221
222void ClusterCopier::uploadTaskDescription(const std::string & task_path, const std::string & task_file, const bool force)
223{

Callers

nothing calls this directly

Calls 5

setThreadNameFunction · 0.85
activeMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected