You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[feature] Issue #37: Support MTS distributing in table level
MySQL 5.6 introduce Multi-Threaded Slaves(MTS) which significantly improved
replicating capability of slave. However, the original MTS only support
distributing in schema level, which limits the parallelism of worker threads.
For example, if all updates on master is under one schema, there will be
only one worker applying events, and degenerate to signle thread replication.
To solve this problem, we add a new distributing level, table mode.
In the new mode, events can be distributing to different workers as long as
different tables is involed.
A new global option "slave_pr_mode" is introduced, which can be configured as:
1. schema, distributing in schema mode, same as origial;
2. table, distributing in table mode.
Note: if changed dynamically, please remember to restart SQL thread,
i.e. "stop slave sql_thread; start slave sql_thread", to make the changes
take effect.
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4
+
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
5
+
Warnings:
6
+
Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
7
+
[connection master]
8
+
reset master;
9
+
create table t1(c int) engine=innodb;
10
+
create table t2(c int) engine=innodb;
11
+
create table t3(c int) engine=innodb;
12
+
insert into t1 values(1);
13
+
insert into t2 values(2);
14
+
insert into t3 values(3);
15
+
insert into t2 values(2);
16
+
stop slave;
17
+
change master to master_auto_position=1;
18
+
start slave;
19
+
Warnings:
20
+
Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
21
+
stop slave;
22
+
set global relay_log_info_repository='FILE';
23
+
start slave;
24
+
Warnings:
25
+
Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
26
+
insert into t3 values(3);
27
+
drop table t3;
28
+
drop table t2;
29
+
drop table t1;
30
+
stop slave;
31
+
set global relay_log_info_repository='TABLE';
32
+
change master to master_auto_position=0;
33
+
start slave;
34
+
Warnings:
35
+
Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
0 commit comments