[MDEV-30421] SAMU-64 Allow administrators to enable or disable parallel replication on a per-table basis Created: 2023-01-17 Updated: 2024-02-05 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Fix Version/s: | 11.5 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Aleksey Midenkov | Assignee: | Aleksey Midenkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
SAMU-64 Allow administrators to enable or disable parallel replication on a per-table basis
|
| Comments |
| Comment by Aleksey Midenkov [ 2023-03-07 ] | |||
|
Please review test refactorings https://github.com/MariaDB/server/commits/bb-10.3-midenok2 | |||
| Comment by Andrei Elkin [ 2023-03-07 ] | |||
|
Thanks Aleksey! Hopefully involved tests analysis/maintenance will be easier after your improvements. | |||
| Comment by Aleksey Midenkov [ 2023-03-21 ] | |||
|
| |||
| Comment by Aleksey Midenkov [ 2023-03-26 ] | |||
|
Please review bb-11.0-midenok-MDEV-30421 | |||
| Comment by Andrei Elkin [ 2023-06-05 ] | |||
|
As a part of the proposed design review
| |||
| Comment by Aleksey Midenkov [ 2023-07-03 ] | |||
|
Please review bb-10.4-midenok-MDEV-30421 based on dependency PoC | |||
| Comment by Kristian Nielsen [ 2023-08-10 ] | |||
|
If I understand this correctly, it adds a number of configuration variables --parallel-do-db etc., which affect the flags in the binlogged GTID event based on which tables are participating in the binlogged event group. I think this should instead use CREATE TABLE options. Instead of adding a table to the --parallel-ignore-table, one would ALTER TABLE t SKIP_PARALLEL=1 (probably need some thought on the best name for the table option). Table option is more appropriate for a couple of reasons. This affects the transaction when it is committed (binlogged), after this it cannot be changed. Thus, it is a property of the table at the time of commit, not a property of the configuration of the server when the event is sent to the slave or replicated on the slave. Therefore, it does not add any flexibility to be able to control this with configuration options, unlike for example --replicate-ignore-table. All such properties of a table should for consistency be a part of the table definition. There may be many other similar properties of a table in the future that affect replication. One example that could be useful is to mark a table unsafe for statement-based replication, so that all queries against it will use ROW mode in --binlog-format=mixed. And there will probably be others. It is much better to add CREATE TABLE options for each of these than to add separate set of new configuration variables for each one. Being able to specify the option on a per-table basis is more flexible for the DBA, and more efficient for the server to check (just a lookup in the table share, as compared to a match of a potential complex set of filters against each table). | |||
| Comment by Ralf Gebhardt [ 2023-08-10 ] | |||
|
Elkin, I like the idea to use table options instead of environment variables to control table related behaviors for the replication. This can also help for cases like MDEV-22327, where we could have a table option to skip replication added by default for federated engines. What do you think? | |||
| Comment by Andrei Elkin [ 2023-11-15 ] | |||
|
ralf.gebhardt], I lean towards knielsen's refinement. Yet afair midenok may correct me, the primary use case was |