Make it clearer that a witness node counts as a "sibling node"

It's not attached to the primary per-se, but needs to know what
the current primary is in order to correctly synchronise its
copy of the metadata.

Per GitHub #560.
This commit is contained in:
Ian Barwick
2019-05-02 14:22:53 +09:00
parent 8da355eb3f
commit 4b37562444
3 changed files with 19 additions and 3 deletions

View File

@@ -7057,9 +7057,17 @@ check_sibling_nodes(NodeInfoList *sibling_nodes, SiblingNodeStats *sibling_nodes
for (cell = sibling_nodes->head; cell; cell = cell->next)
{
appendPQExpBuffer(&nodes,
" %s (node ID: %i)",
" %s (node ID: %i",
cell->node_info->node_name,
cell->node_info->node_id);
if (cell->node_info->type == WITNESS)
{
appendPQExpBufferStr(&nodes,
", witness server");
}
appendPQExpBufferChar(&nodes,
')');
if (cell->next)
appendPQExpBufferStr(&nodes, "\n");
}