2
0
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:
Han Zhou
2019-04-12 16:26:24 -07:00
committed by Ben Pfaff
parent 67dba07063
commit d59050555c
3 changed files with 16 additions and 2 deletions

View File

@@ -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());