openark / orchestrator

MySQL replication topology management and HA
Apache License 2.0
5.62k stars 926 forks source link

Does orchestrator support "supply data from a DeadMaster" ? #753

Open JeremyYu2018 opened 5 years ago

JeremyYu2018 commented 5 years ago

There is a scenrio that where one-master/two-direct-slaves asynchronous mysql topology, where a master instance found dead but host is fine,

  1. before promote one ideal slave, the promoted slave could apply the unfinished relay-logs(do not stop slave), and then get diff binlogs from dead master, when all is done, do 'reset slave all' thing。
    1. in all promoting-one-slave-process, could orchestrator give a proper time to ideal slave to apply apply the unfinished relay logs, if not, this could result in data loss. I found variable 'FailMasterPromotionIfSQLThreadNotUpToDate' doesn't satisfy this.
shlomi-noach commented 5 years ago

before promote one ideal slave, the promoted slave could apply the unfinished relay-logs(do not stop slave)

I'm expecting a PR from a contributor which does exactly that.

and then get diff binlogs from dead master,

There is no plan to make that happen.

in all promoting-one-slave-process, could orchestrator give a proper time to ideal slave to apply apply the unfinished relay logs

Repeats the first question. I'm expecting a PR.

JeremyYu2018 commented 5 years ago

@shlomi-noach if we can design an agent to get diff binlog between Slave IO THREAD and Master Executed GTID, that would be excellent! we could make consistent failover(no data loss) when not using semi-sync replication。just like MHA, still no plan?