Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.
|
https://github.com/alibaba/AliSQL/commit/945e59d98c280fc253dde17c42116075d8c87311