// synchronization provider
-string Monitor::_pick_random_mon()
+string Monitor::_pick_random_mon(int other)
{
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();
+ string _pick_random_mon(int other = -1);
int _pick_random_quorum_mon(int other = -1);
/**
* Deal with the consequences of @p entity's sync timing out.