@@ -117,7 +117,8 @@ class PoolWithFailoverBase : private boost::noncopyable
117117 using PoolStates = std::vector<PoolState>;
118118
119119 // / Returns a single connection.
120- Entry get (const TryGetEntryFunc & try_get_entry, const GetPriorityFunc & get_priority = GetPriorityFunc());
120+ Entry get (size_t max_ignored_errors, bool fallback_to_stale_replicas,
121+ const TryGetEntryFunc & try_get_entry, const GetPriorityFunc & get_priority = GetPriorityFunc());
121122
122123 // / This function returns a copy of pool states to avoid race conditions when modifying shared pool states.
123124 PoolStates updatePoolStates (size_t max_ignored_errors);
@@ -138,9 +139,13 @@ class PoolWithFailoverBase : private boost::noncopyable
138139
139140template <typename TNestedPool>
140141typename TNestedPool::Entry
141- PoolWithFailoverBase<TNestedPool>::get(const TryGetEntryFunc & try_get_entry, const GetPriorityFunc & get_priority)
142+ PoolWithFailoverBase<TNestedPool>::get(size_t max_ignored_errors, bool fallback_to_stale_replicas,
143+ const TryGetEntryFunc & try_get_entry, const GetPriorityFunc & get_priority)
142144{
143- std::vector<TryResult> results = getMany (1 , 1 , 1 , 0 , true , try_get_entry, get_priority);
145+ std::vector<TryResult> results = getMany (
146+ 1 /* min entries */ , 1 /* max entries */ , 1 /* max tries */ ,
147+ max_ignored_errors, fallback_to_stale_replicas,
148+ try_get_entry, get_priority);
144149 if (results.empty () || results[0 ].entry .isNull ())
145150 throw DB::Exception (
146151 " PoolWithFailoverBase::getMany() returned less than min_entries entries." ,
0 commit comments