[MXS-842] Unexpected / undocumented behaviour when multiple available masters from mmmon monitor Created: 2016-08-26 Updated: 2016-08-30 Resolved: 2016-08-30 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Documentation, readconnroute |
| Affects Version/s: | 1.4.3 |
| Fix Version/s: | 2.0.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Michaël de groot | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 2016-17 |
| Description |
|
Hi, When the mmmon monitor detects multiple masters, the last master is always used by readconnroute:
Two masters can be achieved by (incorrectly) disabling read_only on 2 nodes:
The weightby feature is ignored in this case. I think this is desired behaviour. In case of a flapping primary node and the failed over node coming back, the read_only could be enabled on both nodes. Perhaps easiest is to document it in the MMMon module? And perhaps in the weightby documentation a note that in case of multiple masters all traffic is always redirected to the last master? Thanks, |
| Comments |
| Comment by Michaël de groot [ 2016-08-26 ] |
|
Or we could change the monitor to only designate 1 as master and the other one as "Incorrectly configured master node" ? |
| Comment by markus makela [ 2016-08-30 ] |
|
This could be considered a bug in the readconnroute. When the root master server, the server with the lowest depth in the replication tree, is being chosen, the weights of the masters are ignored. If two servers with equal depth are found, the weights should be compared. The master with the lowest depth and highest weight should be used as the root master. |
| Comment by markus makela [ 2016-08-30 ] |
|
The server weights are now inspected before the root master is chosen. |
| Comment by markus makela [ 2016-08-30 ] |
|
The readconnroute module now properly takes weights into notice. If two master servers with equal depth in the replication topology are found, the weighting parameter of the servers is compared. If even the weights are equal, the master which was first listed in the servers parameter of the service is chosen. |