Hi
I was set up PXC & ProxySQL for some testing.
I made host group 0 that included host1 and host2.
And I would like to use these servers like this:
host1 : primary for write transaction
host2 : secondary for write transaction
So I expected that host1 processes most of write transaction, and host2 processes write transaction if host1 is down.
And then I expected host1 processes write transaction again, if host1 is recovered.
I set mysql_server table like this.
±-------------±-------------±-------±----------+
| hostgroup_id | hostname | status | weight |
±-------------±-------------±-------±----------+
| 0 | host1 | ONLINE | [COLOR=#FF0000]1000000 |
| 0 | host2 | ONLINE | [COLOR=#FF0000]1000 |
±-------------±-------------±-------±----------+
It is working well at first as I expect.
But if host1 is stop and start, weight value of host1 is changed default value(1000).
±-------------±-------------±-------±-------+
| hostgroup_id | hostname | status | weight |
±-------------±-------------±-------±-------+
| 0 | host1 | ONLINE | [COLOR=#FF0000]1000 |
| 0 | host2 | ONLINE | [COLOR=#FF0000]1000 |
±-------------±-------------±-------±-------+
How can I do not to change weight value of host1 ?