Bug #72118 PROMOTING A SLAVE after a RESET MASTER hangs
Submitted: 24 Mar 2014 23:28 Modified: 23 May 2014 4:20
Reporter: Alfranio Correia Email Updates:
Status: Closed Impact on me:
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.0 OS:Any
Assigned to: Alfranio Correia CPU Architecture:Any

[24 Mar 2014 23:28] Alfranio Correia
"PROMOTE" after "RESET MASTER" is making Fabric hang due to apparently a change in the replication's behavior. After the "RESET MASTER", the GTID EXECUTED variable is cleaned and the "PROMOTE" operation, specially the failover code, is fetching the GTID RETRIEVED variable and is waiting until all retrieved transactions are reprocessed. However, the relay log(s) is not read from the beginning anymore and thus operation hangs as nothing is read from the relay log(s).

How to repeat:
These are the steps two repeat the problem:

  . Use the latest MySQL Server (e.g. 5.6.18)
  . Create a group with two servers at least
  . Execute a statement on the master
  . Demote the group
  . Execute reset master on all servers
  . Try to promote the slave to master

Suggested fix:
Periodically execute "SHOW SLAVE STATUS" to check whether the slave has processed all the entries in the relay log.
[23 May 2014 4:20] Philip Olson
Fixed as of the upcoming MySQL Utilities 1.4.3 release, and here's the changelog entry:

A "PROMOTE" after "RESET MASTER" would cause Fabric to hang. Now, "SHOW
SLAVE STATUS" is used to check whether the slave has processed all of the
entries in the relay log.

Thank you for the bug report.