Bug #73479 Master ha switch should could be more quickly even when slave seconds behinds
Submitted: 6 Aug 2014 7:06 Modified: 6 Aug 2014 7:14
Reporter: 徐良 徐 Email Updates:
Status: Open Impact on me:
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:5.1.63 OS:Any
Assigned to: CPU Architecture:Any
Tags: ha, replication, Seconds_Behind_Master

[6 Aug 2014 7:06] 徐良 徐
   There are some ha solutions,like replication,semi-sync,storage,mysql cluser.they provide more data consistency.
    But I need a feature that the ha_master switch can happen even when the slave has many Seconds_Behind_Master if the master is down ,because I want the application access mysql as soon as possible.
    When slave replication Seconds_Behind_Master is happen,if the master is down,the two slave already dump the binlog to local disk into relay log,but if I change master to a slave which is elected being new master ,the server will purge the local relay log,and  replicate the same binlog events again from the new master(another slave ) after  the binlog events have been executed by the new master.


How to repeat:
every time the master is down when the slaves have many seconds behind master.

Suggested fix:
   MySQL should provide two features:
    change master command have two more parameters: 
0:purge local relay log
1:do not purge local relay log

do not replicate the events from old master.
[6 Aug 2014 7:14] 徐良 徐
do not dump the events to relay log from old master.