[MXS-958] If slave is not started after CHANGE MASTER, then Master_log_file is lost when maxscale restarts Created: 2016-10-27 Updated: 2016-12-01 Resolved: 2016-11-28 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | binlogrouter |
| Affects Version/s: | 1.4.3 |
| Fix Version/s: | 1.4.4, 2.0.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Massimiliano Pinto (Inactive) |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Description |
|
If the binlog router's slave is not started after executing CHANGE MASTER, then the configured value of Master_log_file is lost if the maxscale service is restarted. To reproduce, let's say that I have the following MaxScale configuration file:
When I start MaxScale up with this configuration file, I log into the replication listener, and I execute CHANGE MASTER in the following way:
Note that I did not execute START SLAVE. Now let's say that I restart MaxScale without starting the slave first:
At this point, Master_log_file will be reset to mariadb.000001 according to the log:
And if this older binlog file doesn't exist on the master, then MaxScale will fail:
|
| Comments |
| Comment by Massimiliano Pinto (Inactive) [ 2016-10-28 ] |
|
Some background infos: 2) The START SLAVE command then creates the new binlog file before starting the replication 3) When Binlog Server is not configured, the 'master.ini' file doesn't exist. 4) If Binlog server is already configured, the CHANGE MASTER TO 'new_file' doesn't create a new binlog file First improvement is to add the binlog file creation at point 3) New added behaviour for 3) almost ready. A.1) master.ini doesn't exist and it's created by this SQL statement "change master to ..." B.1) If START SLAVE is not executed the new created binlogfile is still in the $binlogdir. This is the log entry in such scenario: MySQL [(none)]> change master to master_log_file='mysql-bin.000009', master_host='127.0.0.1', master_port=10116, master_user='massi', master_password='massi'; The log message clearly says master.ini was created with a new binlog file 'mysql-bin.000009' with size 4
At this point replication will start either by issuing START SLAVE or by restarting maxscale. New possible scenario for binlog file creation are under investigation |