event is passed back and forth between dual master if event is from some other mysqld
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Medium
|
Unassigned | |||
5.5 |
Triaged
|
Medium
|
Unassigned | |||
5.6 |
Triaged
|
Medium
|
Unassigned | |||
5.7 |
Triaged
|
Medium
|
Unassigned |
Bug Description
For master fail-over scenario, we suffered the pain of unnecessary cost
for events passing between the dual master, back and forth.
Take an example:
MySQL1 <---(dual master) ---> MySQL2 ---(rep)---> MySQL3
For the toplogical structure above, MySQL1 is readable/writable, but MySQL2
is readonly. If MySQL1 is down, then MySQL2 takes over the write ability
and makes MySQL3 as it's dual master. Consider some relay log not yet applied
on MySQL2 when MySQL1 is down(log_
be passed between MySQL2 and MySQL3 back and forth.
It's easy to solve once we detect such problem:
1. break the replication on MySQL2 which received changes from MySQL3.
2. wait until these events from MySQL1 are applied on MySQL3.
3. change master to the new binary position.
However, if the events were applied very quickly on heavy workload MySQL,
it's not easy to detect these unnecessary events, and made the master/slave
lower performance. So, we try to find these scenarios inner MySQL to alert
DBA.
If such events are detected:
1) event's server_id is not the same as local server_id
2) event's server_id is not in the slaves server_id list
3) there exists a cycle of topological structure.
then an error info is printed in error.log.
A patch is attached.
Changed in percona-server: | |
importance: | Undecided → Medium |
tags: | added: contribution |
Tweak the test case for easier understand.