[MXS-3550] write statistic is incremented for slaves Created: 2021-05-17 Updated: 2021-09-01 Resolved: 2021-08-04 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readwritesplit |
| Affects Version/s: | 2.5.11 |
| Fix Version/s: | 2.5.15 |
| Type: | Bug | Priority: | Major |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
On a setup with two servers, the slave server's write statistic is incremented by either some command or a specific set of actions (unknown at this point). This is unexpected as nothing routed to a slave should be counted as a write. Most likely a side-effect of the following commit from 2.5.11:
|
| Comments |
| Comment by markus makela [ 2021-08-02 ] |
|
A somewhat of a brute-force fix to this can be done by looking at the target type of the node we're routing a query to. If the old code would treat the command as a write, we can perform an extra check to make sure the node is our current master node before incrementing it. This will prevent the write statistic from being updated on slaves even if the query classifier classifies it as such. |