The other arg isn't used, so remove the (broken) handling for that case.
If we re-add it later, model after the MonClient's version.
Fixes: #4821
Signed-off-by: Sage Weil <sage@inktank.com>
// synchronization provider
-string Monitor::_pick_random_mon(int other)
+string Monitor::_pick_random_mon()
{
assert(monmap->size() > 0);
if (monmap->size() == 1)
int max = monmap->size();
int n = sync_rng() % max;
- if (other >= 0 && n >= other)
- n++;
return monmap->get_name(n);
}
* @param other Any monitor other than the one with rank @p other
* @returns The picked monitor's name.
*/
- string _pick_random_mon(int other = -1);
+ string _pick_random_mon();
int _pick_random_quorum_mon(int other = -1);
/**
* Deal with the consequences of @p entity's sync timing out.