ctdb-recoverd: Change get_remote_nodemaps() to use connected nodes
authorMartin Schwenke <martin@meltin.net>
Thu, 18 Jan 2018 09:02:42 +0000 (20:02 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 18 Aug 2020 05:02:25 +0000 (05:02 +0000)
commit762d1d8a9605f97973a2c1176de5d29fcc61d15a
tree4a3e3cd5f7109b36c4d1c7895ce0fa3f43dcff82
parent368c83bfe3bbfff568d14f65e7b1ffa41d5349ac
ctdb-recoverd: Change get_remote_nodemaps() to use connected nodes

The plan here is to use the nodemaps retrieved by get_remote_nodes()
in update_local_flags().  This will improve efficiency, since
get_remote_nodes() fetches flags from nodes in parallel.  It also
means that get_remote_nodes() can be used exactly once early on in
main_loop() to retrieve remote nodemaps.  Retrieving nodemaps multiple
times is unnecessary and racy - a single monitoring iteration should
not fetch flags multiple times and compare them.

This introduces a temporary behaviour change but it will be of no
consequence when the above changes are made.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recoverd.c