1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-6676: Optimistic parallel replication

Implement a new mode for parallel replication. In this mode, all transactions
are optimistically attempted applied in parallel. In case of conflicts, the
offending transaction is rolled back and retried later non-parallel.

This is an early-release patch to facilitate testing, more changes to user
interface / options will be expected. The new mode is not enabled by default.
This commit is contained in:
Kristian Nielsen
2014-12-05 16:09:48 +01:00
parent 1e3f09f163
commit db21fddc37
55 changed files with 2596 additions and 466 deletions

View File

@@ -1421,6 +1421,9 @@ void THD::init(void)
transaction.all.modified_non_trans_table=
transaction.stmt.modified_non_trans_table= FALSE;
transaction.all.m_unsafe_rollback_flags=
transaction.stmt.m_unsafe_rollback_flags= 0;
open_options=ha_open_options;
update_lock_default= (variables.low_priority_updates ?
TL_WRITE_LOW_PRIORITY :
@@ -4372,6 +4375,8 @@ thd_need_wait_for(const MYSQL_THD thd)
{
rpl_group_info *rgi;
if (mysql_bin_log.is_open())
return true;
if (!thd)
return false;
rgi= thd->rgi_slave;
@@ -4406,12 +4411,16 @@ thd_need_wait_for(const MYSQL_THD thd)
not harmful, but could lead to unnecessary kill and retry, so best avoided).
*/
extern "C" void
thd_report_wait_for(const MYSQL_THD thd, MYSQL_THD other_thd)
thd_report_wait_for(MYSQL_THD thd, MYSQL_THD other_thd)
{
rpl_group_info *rgi;
rpl_group_info *other_rgi;
if (!thd || !other_thd)
if (!thd)
return;
DEBUG_SYNC(thd, "thd_report_wait_for");
thd->transaction.stmt.mark_trans_did_wait();
if (!other_thd)
return;
rgi= thd->rgi_slave;
other_rgi= other_thd->rgi_slave;