[MXS-3816] Queries are not always counted as reads with router_options=slave Created: 2021-10-14  Updated: 2021-10-22  Resolved: 2021-10-15

Status: Closed
Project: MariaDB MaxScale
Component/s: readconnroute
Affects Version/s: 2.5.16
Fix Version/s: 2.5.17, 6.1.4

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

If readconnroute is configured with router_options=slave but it ends up choosing a server labeled as Master, Running for the connection, all queries will be counted as writes for the statistics.

The reason this happens is because the internal bitmask value is modified with SERVER_MASTER to accept the server even it doesn't have the SERVER_SLAVE bit on. Since the code checks for the SERVER_MASTER bit when incrementing the counters, it falsely counts it as a write when it should be counted as a read due to router_options=slave.


Generated at Thu Feb 08 04:24:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.