We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A server is wrongly placed in the reader_hostgroup for writer_is_also_reader=2 when there are no backup servers available.
reader_hostgroup
writer_is_also_reader=2
ProxySQL version
v2.0.16
v2.1.0
OS version
NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling
Configure ProxySQL with the following mysql_galera_hostgroups and mysql_servers configuration:
mysql_galera_hostgroups
mysql_servers
mysql> select * from runtime_mysql_galera_hostgroups; +------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+ | writer_hostgroup | backup_writer_hostgroup | reader_hostgroup | offline_hostgroup | active | max_writers | writer_is_also_reader | max_transactions_behind | comment | +------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+ | 20 | 30 | 10 | 40 | 1 | 1 | 2 | 100 | NULL | +------------------+-------------------------+------------------+-------------------+--------+-------------+-----------------------+-------------------------+---------+ 1 row in set (0.00 sec)
mysql> select * from mysql_servers; +--------------+-------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+ | hostgroup_id | hostname | port | gtid_port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment | +--------------+-------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+ | 10 | 172.18.1.11 | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | | | 10 | 172.18.1.12 | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | | +--------------+-------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+ 2 rows in set (0.00 sec)
Configure server 172.18.1.11 read only with: SET GLOBAL read_only=ON;
172.18.1.11
SET GLOBAL read_only=ON;
Start ProxySQL.
Check that the current writer is in the reader hostgroup, when only one server should be present.
mysql> select * from runtime_mysql_servers; +--------------+-------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+ | hostgroup_id | hostname | port | gtid_port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment | +--------------+-------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+ | 10 | 172.18.1.11 | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | | | 20 | 172.18.1.12 | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | | | 10 | 172.18.1.12 | 3306 | 0 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | | +--------------+-------------+------+-----------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+ 3 rows in set (0.00 sec)
/var/lib/proxysql/proxysql.log
Attached can be found:
galera_hostgroups
extra_reader_wiar_two.tar.gz
The text was updated successfully, but these errors were encountered:
Merge pull request #3221 from sysown/v2.0.16-3219
0cf37b4
Closes #3219: Server wrongly used as reader for Galera cluster with 'writer_is_also_reader=2'
Merge pull request #3220 from sysown/v2.1.0-3219
fd16ab2
Successfully merging a pull request may close this issue.
A server is wrongly placed in the
reader_hostgroup
forwriter_is_also_reader=2
when there are no backup servers available.ProxySQL version
v2.0.16
v2.1.0
OS version
Configure ProxySQL with the following
mysql_galera_hostgroups
andmysql_servers
configuration:Configure server
172.18.1.11
read only with:SET GLOBAL read_only=ON;
Start ProxySQL.
Check that the current writer is in the reader hostgroup, when only one server should be present.
/var/lib/proxysql/proxysql.log
)Attached can be found:
mysql_servers
table configuration.galera_hostgroups
table configuration.extra_reader_wiar_two.tar.gz
The text was updated successfully, but these errors were encountered: