fix inverted log message

When trying to follow a new primary, the type of the new primary is checked. When it is *not* of type primary, a warning is logged and the follow attempt is aborted. As far as I can tell, the message itself is exactly the opposite of what it should be: The node is not primary, thus it is standby / "in recovery". Feel free to correct me if I’m misunderstanding.
This commit is contained in:
Tom Janson
2020-03-05 14:15:09 +01:00
committed by Ian Barwick
parent fd29a7ae28
commit 3e9f156d3c

View File

@@ -3655,7 +3655,7 @@ follow_new_primary(int new_primary_id)
else
{
new_primary_ok = false;
log_warning(_("new primary is not in recovery"));
log_warning(_("new primary is in recovery"));
close_connection(&upstream_conn);
}
}
@@ -3848,7 +3848,7 @@ witness_follow_new_primary(int new_primary_id)
break;
case RECTYPE_STANDBY:
new_primary_ok = false;
log_warning(_("new primary is not in recovery"));
log_warning(_("new primary is in recovery"));
break;
case RECTYPE_UNKNOWN:
new_primary_ok = false;