[MXS-1509] Show correct server state for multisource replication Created: 2017-11-01  Updated: 2020-08-25  Resolved: 2017-11-30

Status: Closed
Project: MariaDB MaxScale
Component/s: maxadmin
Affects Version/s: 2.1.10
Fix Version/s: 2.1.12

Type: Bug Priority: Minor
Reporter: Kyle Joiner (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 1
Labels: None

Sprint: 2017-46

 Description   

We have setup where server A is a master of slave, server B. Server A has database X, which is replicating to slave B. We have configured Maxscale to monitor server A and server B, and as expected the list servers command shows:

-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status 
-------------------+-----------------+-------+-------------+--------------------
server_01 | xxx.xxx.xxx.67 | 3306 | 0 | Master, Running
server_02 | xxx.xxx.xxx.68 | 3306 | 0 | Slave, Running
-------------------+-----------------+-------+-------------+--------------------

We also have a database Y in server C which is replicating to server A and server B.Therefore server C is a master of server A and server B, and server B now has multi-source replication setup. When we do this the list server command on Maxscale shows:

-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status 
-------------------+-----------------+-------+-------------+--------------------
server_01 | xxx.xxx.xxx.67 | 3306 | 0 | Master, Slave, Slave of External Server, Stale Status, Running
server_02 | xxx.xxx.xxx.68 | 3306 | 0 | Slave, Slave of External Server, Running
-------------------+-----------------+-------+-------------+--------------------

However, when we restart Maxscale, the status changes to :

-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status 
-------------------+-----------------+-------+-------------+--------------------
server_01 | xxx.xxx.xxx.67 | 3306 | 0 | Slave, Slave of External Server, Running
server_02 | xxx.xxx.xxx.68 | 3306 | 0 | Slave, Slave of External Server, Running
-------------------+-----------------+-------+-------------+--------------------

Also the maxscle log has the following entry:

error : [mysqlmon] No Master can be determined



 Comments   
Comment by markus makela [ 2017-11-02 ]

A rough diagram of the setup:

+------------+
|            |
|  Seen by   |
|  MaxScale  |
|            |
|    +---+   | +---+
|    |   |   | |   |
|    | A <-----+ C |
|    |   |   | |   |
|    +-+-+   | +-+-+
|      |     |   |
|      |     |   |
|      |     |   |
|    +-v-+   |   |
|    |   |   |   |
|    | B <-------+
|    |   |   |
|    +---+   |
|            |
+------------+

Here we would want to label the server A as the master even if it's replicating from an external server that is not configured in MaxScale.

Comment by markus makela [ 2017-11-21 ]

Implementation added, tests still needed.

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