[MDEV-7458] Deadlock in parallel replication can allow following transaction to start replicating too early Created: 2015-01-14 Updated: 2015-08-04 Resolved: 2015-02-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.15 |
| Fix Version/s: | 10.0.17 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | parallelslave, replication | ||
| Issue Links: |
|
||||||||
| Description |
|
In parallel replication, if T2 blocks T1 on an InnoDB row lock, we deadlock If T2 already started to commit, it might have done mark_start_commit() at the But this turns out not to work as expected. The reason is that Thus we can have the following situation: 1. T2 starts committing, it is waiting in queue_for_group_commit() for T1 to 2. We detect the deadlock, we kill T2. T2 returns error from log_and_order(), 3. T1 can proceed due to the rollback, and itself does mark_start_commit(). 4. T3 sees that T1 and T2 both started to commit, and starts executing. 5. T2 does unmark_start_commit(). At this point, T2 and T3 are running in It was first thought that this condition does not cause any user-visible Maybe we need a check in ha_commit_trans() to not rollback in case of parallel |
| Comments |
| Comment by Kristian Nielsen [ 2015-02-20 ] |
|
http://lists.askmonty.org/pipermail/commits/2015-February/007460.html |