[MDEV-6775] Wrong binlog order in parallel replication Created: 2014-09-24 Updated: 2014-11-13 Resolved: 2014-11-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.14 |
| Fix Version/s: | 10.0.15 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | parallelslave, replication | ||
| Description |
|
Parallel replication uses the wait_for_commit facility to ensure that binlog However, there is a bug in this for statements such as GRANT, which are First, the code for directly writing to binlog, in MYSQL_BIN_LOG::write(), was The group commit works in the following way. The first thread registers itself However, the directly written statements bypass this group commit code. This I think a possible solution is to make the direct write transactions also go This solution will need some work, but sounds like a possibility. The problem occurs only as a rare race, but it can be triggered a few times an
The gtid-strict-mode makes the slave fail when an out-of-order binlog write is |
| Comments |
| Comment by Kristian Nielsen [ 2014-10-06 ] | ||||||||||||||||
|
Maybe another fix could be to not wake up other transactions until after the I found another related problem, actually seen as a very rare race/failure
Here we have two transactions:
The failure suggests that the slave sees the DELETE but not the UPDATE. In In GTID mode, this would actually be a bug, as then in case of crash we could | ||||||||||||||||
| Comment by Kristian Nielsen [ 2014-10-14 ] | ||||||||||||||||
|
I now have a patch for this that looks good. Test case: http://lists.askmonty.org/pipermail/commits/2014-October/006782.html | ||||||||||||||||
| Comment by Kristian Nielsen [ 2014-11-13 ] | ||||||||||||||||
|
Pushed to 10.0.15: http://lists.askmonty.org/pipermail/commits/2014-November/006976.html |