mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: ensure standby_nodes list is up-to-date
This commit is contained in:
10
repmgrd.c
10
repmgrd.c
@@ -620,6 +620,14 @@ monitor_streaming_standby(void)
|
||||
|
||||
log_info("I am the candidate but did not get all votes; will now determine the best candidate");
|
||||
|
||||
|
||||
/* reset node list */
|
||||
clear_node_info_list(&standby_nodes);
|
||||
get_active_sibling_node_records(local_conn,
|
||||
local_node_info.node_id,
|
||||
upstream_node_info.node_id,
|
||||
&standby_nodes);
|
||||
|
||||
best_candidate = poll_best_candidate(&standby_nodes);
|
||||
|
||||
/* this can occur in a tie-break situation, after we establish this node has priority*/
|
||||
@@ -886,6 +894,8 @@ poll_best_candidate(NodeInfoList *standby_nodes)
|
||||
NodeInfoListCell *cell;
|
||||
t_node_info *best_candidate = &local_node_info;
|
||||
|
||||
// XXX ensure standby_nodes is set correctly
|
||||
|
||||
/*
|
||||
* we need to definitively decide the best candidate, as in some corner
|
||||
* cases we could end up with two candidate nodes, so they should each
|
||||
|
||||
Reference in New Issue
Block a user