| 202 | } |
| 203 | |
| 204 | void 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 | |
| 222 | void ClusterCopier::uploadTaskDescription(const std::string & task_path, const std::string & task_file, const bool force) |
| 223 | { |
nothing calls this directly
no test coverage detected