Bug #87102 | Changing MASTER_DELAY to 0 purges all binlogs and makes recovery impossible | ||
---|---|---|---|
Submitted: | 18 Jul 2017 4:23 | Modified: | 20 Sep 2017 6:22 |
Reporter: | Mikhail Golenkov | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.6.36 | OS: | CentOS (CentOS 6,7. x86_64) |
Assigned to: | Venkatesh Duggirala | CPU Architecture: | Any |
Tags: | replication delay recovery |
[18 Jul 2017 4:23]
Mikhail Golenkov
[23 Jul 2017 7:33]
MySQL Verification Team
Bug 26410977 - CHANGING MASTER_DELAY DISCARDS RELAY LOGS IF IO_THREAD IS STOPPED
[24 Jul 2017 11:41]
MySQL Verification Team
Hi, Thanks for your report. This is a duplicate of Bug #26410977 - CHANGING MASTER_DELAY DISCARDS RELAY LOGS IF IO_THREAD IS STOPPED A workaround is to use only STOP SLAVE SQL_THREAD; rather than STOP SLAVE; before executing CHANGE MASTER TO MASTER_DELAY=N; all best Bogdan
[24 Jul 2017 11:47]
Дмитрий Афонасов
Dear support team, mysql> stop slave SQL_THREAD; Query OK, 0 rows affected (0.05 sec) mysql> change master to master_delay=0; ERROR 1198 (HY000): This operation cannot be performed with a running slave; run STOP SLAVE first Thus, STOP SLAVE must be executed before executing CHANGE MASTER TO MASTER_DELAY=0. Best regards.
[24 Jul 2017 12:39]
MySQL Verification Team
Hi, That workaround works on 5.7, on 5.6 there's no workaround I'm afraid The bug is being processed, not much we can do now but wait for it to be fixed. all best Bogdan slave1 [localhost] {msandbox} ((none)) > CHANGE MASTER TO MASTER_DELAY = 100000; ERROR 3085 (HY000): This operation cannot be performed with a running slave sql thread; run STOP SLAVE SQL_THREAD FOR CHANNEL '' first. slave1 [localhost] {msandbox} ((none)) > STOP SLAVE SQL_THREAD; Query OK, 0 rows affected (0.00 sec) slave1 [localhost] {msandbox} ((none)) > CHANGE MASTER TO MASTER_DELAY = 100000; Query OK, 0 rows affected (0.00 sec) slave1 [localhost] {msandbox} ((none)) > start slave; Query OK, 0 rows affected (0.00 sec) slave1 [localhost] {msandbox} ((none)) > CHANGE MASTER TO MASTER_DELAY = 0; ERROR 3085 (HY000): This operation cannot be performed with a running slave sql thread; run STOP SLAVE SQL_THREAD FOR CHANNEL '' first. slave1 [localhost] {msandbox} ((none)) > STOP SLAVE SQL_THREAD; Query OK, 0 rows affected (0.00 sec) slave1 [localhost] {msandbox} ((none)) > CHANGE MASTER TO MASTER_DELAY = 0; Query OK, 0 rows affected (0.00 sec) slave1 [localhost] {msandbox} ((none)) > select @@version; +------------+ | @@version | +------------+ | 5.7.19-log | +------------+ 1 row in set (0.00 sec)
[25 Jul 2017 2:39]
Mikhail Golenkov
Dear support team, Yes, It works on 5.7. Thank you. Unfortunately, one of our critical application works with 5.6 only. Hope, that the same workaround will be available on 5.6 soon. Best regards.
[25 Jul 2017 4:51]
MySQL Verification Team
:D thanks for confirmation. I rather think the bug will be fixed and the workaround will not be needed. all best Bogdan
[20 Sep 2017 6:22]
Venkatesh Duggirala
Post by Developer: ================== Hello Mikhail, Thank you for the bug report. There are two things that I would like to mention in this bug while I mark its status as "Not a bug" 1) In the description(and the title) you were mentioning "binlogs". Actually the term for the logs that were downloaded on Slave by receiver thread are called "Relay logs". I assume that you were actually talking about "Relay logs" are getting purged and not "binary logs". Please correct me if that is not the case. 2) Assuming that point-1 holds good, purging the relay logs during "Change master" command is known, documented legacy behaviour if you do not specify Relay_log_file/Relay_log_pos in the command. Please have a look at https://dev.mysql.com/doc/refman/5.6/en/change-master-to.html , this says "CHANGE MASTER TO" deletes all relay log files and starts a new one, unless you specify RELAY_LOG_FILE or RELAY_LOG_POS" Please let me know if you see any issues with the relay log files even when you specify one of these two values. Regards, Venkatesh.