[MDEV-20051] Add new mode to wsrep_OSU_method in which Galera checks storage engine of the effected table Created: 2019-07-11 Updated: 2020-12-02 Resolved: 2020-02-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Data Definition - Create Table, Galera, wsrep |
| Fix Version/s: | 10.5.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
Currently, if wsrep_OSU_method is set to TOI, then Galera Cluster will replicate all DDL statements. This is true even if the effected table does not support Galera replication. https://mariadb.com/kb/en/library/galera-cluster-system-variables/#wsrep_osu_method To confirm this, I performed the following test with a 3-node cluster running MariaDB 10.3.16:
First, the output of the CREATE and INSERT portion:
The CREATE was replicated, but the INSERTs were not. Next, the output of the TRUNCATE portion:
We can see that the TRUNCATE was also replicated. It may be a good idea to add a new method to wsrep_OSU_method in which the storage engines of any tables effected by DDL statements are checked. If the underlying table does not support Galera's replication, then the DDL is not replicated in TOI mode. Usually, this would mean that only DDL statements that effect InnoDB tables should be replicated. However, if wsrep_replicate_myisam were enabled, then DDL statements that effect MyISAM tables should also be replicated. https://mariadb.com/kb/en/library/galera-cluster-system-variables/#wsrep_replicate_myisam If we decide to implement |
| Comments |
| Comment by Jan Lindström (Inactive) [ 2019-09-02 ] |
|
Introduced a new wsrep_osu_method='STRICT' that should be for now set on all nodes in a cluster. When this setting is set following DDL-clauses accessing tables not supporting Galera replication are refused:
|
| Comment by Jan Lindström (Inactive) [ 2019-09-04 ] |
|
GeoffMontee Can you check above behavior, is that acceptable ? |
| Comment by Jan Lindström (Inactive) [ 2019-09-04 ] |
|
svoj I assigned this to you for now, if you know better reviewer please re-assign. https://github.com/MariaDB/server/commit/7e99c7007c33f353e548839ab2373770da7a95d7 |
| Comment by Geoff Montee (Inactive) [ 2019-09-04 ] |
|
Hi jplindst, That behavior sounds good to me. Thanks! |
| Comment by Sergey Vojtovich [ 2019-09-26 ] |
|
Commented github revision. |
| Comment by Jan Lindström (Inactive) [ 2019-10-02 ] |
|
https://github.com/MariaDB/server/commit/935c4dc427aad2d0009e2f3796a9d454adc25e2c |
| Comment by Jan Lindström (Inactive) [ 2019-10-02 ] |
|
Fixed test problem on https://github.com/MariaDB/server/commit/3e85066a886a1c47e71d8dffc958615652ce4bf6 |
| Comment by Jan Lindström (Inactive) [ 2019-11-05 ] |
|
Only InnoDB by default but there is exceptions for wsrep_replicate_myisam and future wsrep_replicate_aria. |
| Comment by Seppo Jaakola [ 2020-01-31 ] |
|
Review done and approved from my side, with one comment in the github patch about the necessicity of passing create_info for wsrep_to_isolation |