Fix AWS Aurora new writer not honoring 'new_reader_weight'

When a writer is also placed in the reader hostgroup due to
'writer_is_also_reader', this new reader should also honor
'new_reader_weight'.
v2.x-aurora_autodiscovery_shunned_promotion
Javier Jaramago Fernández 3 years ago
parent 4524bcba6c
commit 72cfd2452a

@ -7799,6 +7799,7 @@ void MySQL_HostGroups_Manager::update_aws_aurora_set_writer(int _whid, int _rhid
mydb->execute(query);
q = (char *)"UPDATE mysql_servers_incoming SET weight=%d WHERE hostgroup_id=%d AND hostname='%s%s' AND port=%d";
sprintf(query, q, new_reader_weight, read_HG, _server_id, domain_name, aurora_port);
mydb->execute(query);
}
uint64_t checksum_current = 0;
uint64_t checksum_incoming = 0;

Loading…
Cancel
Save