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:
None 
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] 徐良 徐
Description:
   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: 
A、skip_relay_log_purge
0:purge local relay log
1:do not purge local relay log

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

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.