mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
ovsdb-idl: Support optionally not shuffling multiple remotes.
This patch allows remotes not being shuffled if desired (mostly for testing purpose, when we need the order of remotes during retrying be predictable). By default it still shuffles as how it behaves today. Signed-off-by: Han Zhou <hzhou8@ebay.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -824,10 +824,9 @@ jsonrpc_session_open_multiple(const struct svec *remotes, bool retry)
|
||||
|
||||
s = xmalloc(sizeof *s);
|
||||
|
||||
/* Set 'n' remotes from 'names', shuffling them into random order. */
|
||||
/* Set 'n' remotes from 'names'. */
|
||||
ovs_assert(remotes->n > 0);
|
||||
svec_clone(&s->remotes, remotes);
|
||||
svec_shuffle(&s->remotes);
|
||||
s->next_remote = 0;
|
||||
|
||||
s->reconnect = reconnect_create(time_msec());
|
||||
|
Reference in New Issue
Block a user