[MDEV-6676] Optimistic parallel replication Created: 2014-09-01 Updated: 2015-02-07 Resolved: 2015-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Fix Version/s: | 10.1.3 |
| Type: | Task | Priority: | Major |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | parallelslave, replication | ||
| Description |
|
Parallel replication in 10.0 relies either on sufficient parallelism being The original approach in parallel replication was to only run in parallel With this general solution, it actually becomes safe to attempt to replicate To avoid excessive rollback and retry, and to avoid attempts to roll back
|
| Comments |
| Comment by Kristian Nielsen [ 2014-09-05 ] |
|
There is a new issue that one needs to aware of if doing this kind of T1: DELETE FROM t1 WHERE a=1 Suppose we try to run them in parallel. Then T2 might run before T1 has had So if we run T2 speculatively, then we probably need to treat any error as |
| Comment by Arjen Lentz [ 2014-09-23 ] |
|
It should of course be implemented such that it works on any engine, not just InnoDB. How is the XA situation... MariaDB server should be able to run a transaction that uses both InnoDB and for instance TokuDB, and have an all-or-nothing two-phase commit across both/all transactional engines and the binlog. This should work because of earlier work by Serg for XA between InnoDB and the binlog, and later including PBXT. |
| Comment by Kristian Nielsen [ 2014-11-13 ] |
|
I've pushed the current code here and will continue to maintain it in that tree: lp:~maria-captains/maria/10.0-mdev6676 |
| Comment by Kristian Nielsen [ 2014-11-13 ] |
|
@Arjen: The code is implemented so that it can work with other transactional storage engines. Some small additional support is required for an engine to work with speculative parallel replication, so that lock waits that would conflict with replication commit order are detected and flagged as deadlocks. The XA situation is as you describe. Multi-engine transactions use prepare-commit to make sure that everything or nothing is committed to engines and binlog. |
| Comment by Kristian Nielsen [ 2015-02-07 ] |
|
Pushed to 10.1.3 |