| 174 | } |
| 175 | |
| 176 | std::vector<ConnectionPoolWithFailover::TryResult> ConnectionPoolWithFailover::getManyCheckedForInsert( |
| 177 | const ConnectionTimeouts & timeouts, |
| 178 | const Settings & settings, |
| 179 | PoolMode pool_mode, |
| 180 | const QualifiedTableName & table_to_check) |
| 181 | { |
| 182 | TryGetEntryFunc try_get_entry = [&](const NestedPoolPtr & pool, std::string & fail_message) |
| 183 | { return tryGetEntry(pool, timeouts, fail_message, settings, &table_to_check, /*async_callback=*/ {}); }; |
| 184 | |
| 185 | return getManyImpl(settings, pool_mode, try_get_entry, |
| 186 | /*skip_unavailable_endpoints=*/ false, /// skip_unavailable_endpoints is used to get the min number of entries, and we need at least one |
| 187 | /*priority_func=*/ {}, |
| 188 | settings[Setting::distributed_insert_skip_read_only_replicas]); |
| 189 | } |
| 190 | |
| 191 | ConnectionPoolWithFailover::Base::GetPriorityFunc ConnectionPoolWithFailover::makeGetPriorityFunc(const Settings & settings) |
| 192 | { |
no outgoing calls
no test coverage detected