Merge lp:~sergei.glushchenko/percona-server/5.6-ST43091-ps-bug1331586 into lp:percona-server/5.6
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Laurynas Biveinis | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 674 | ||||
Proposed branch: | lp:~sergei.glushchenko/percona-server/5.6-ST43091-ps-bug1331586 | ||||
Merge into: | lp:percona-server/5.6 | ||||
Diff against target: |
526 lines (+409/-1) 9 files modified
mysql-test/suite/rpl/r/percona_bug1331586.result (+139/-0) mysql-test/suite/rpl/t/percona_bug1331586-master.opt (+3/-0) mysql-test/suite/rpl/t/percona_bug1331586-slave.opt (+5/-0) mysql-test/suite/rpl/t/percona_bug1331586.test (+148/-0) sql/log_event.h (+25/-0) sql/rpl_master.cc (+10/-0) sql/rpl_rli.cc (+2/-1) sql/rpl_rli.h (+23/-0) sql/rpl_slave.cc (+54/-0) |
||||
To merge this branch: | bzr merge lp:~sergei.glushchenko/percona-server/5.6-ST43091-ps-bug1331586 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Approve | ||
Review via email: mp+229168@code.launchpad.net |
Description of the change
This patch addresses the issue when incomplete group is read from the
relay log my MTS slave. I tested single-thread slave and it handles
this case correctly.
Incomplete group (not ended by COMMIT/
into relay log in two cases:
1. Slave IO thread restart in the middle of the group.
2. Slave crash or shutdown while receiving log group from master.
3. Master gone when sending events to slave.
4. FLUSH LOGS on slave.
First three cases produce incomplete group at the end of the relay
log file which should be rolled back, while 4th produces log group
spread into two relay log files which should be committed. To
distinguish between these two cases we look into log format events
and stop events. Stop event should always do rollback while format
event should cause rollback in case when "created" flag is set.
Rollback is made by returning artificially generated "ROLLBACK" from
next_event() when needed.
To make test case possible I injected debug-only sync points in
certain places in master IO thread and slave IO thread to produce
incomplete log groups.
Jenkins jenkins. percona. com/view/ PS%205. 6/job/percona- server- 5.6-param/ 680/
http://