[MDEV-20715] Implement system variable to disallow local GTIDs in Galera Created: 2019-10-01 Updated: 2021-04-19 Resolved: 2021-03-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Galera, Replication, wsrep |
| Fix Version/s: | 10.6.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
It is possible to use Galera Cluster with replication. For example: However, if the slave of the Galera Cluster needs to fail over to a new master node, then that can be complicated by the fact that the different nodes may have different GTID positions due to local transactions. Nodes can have GTIDs for local transactions in the following scenarios:
We may want to come up with a way to disallow any statements that would cause local GTIDs in Galera Cluster. For example, we could implement a new system variable called wsrep_disallow_local_gtids. If a user tries to execute a statement that would cause a local GTID, then it could trigger an error. For example:
Or:
But users could still work around this by disabling binary logging. For example:
|
| Comments |
| Comment by Jan Lindström (Inactive) [ 2021-03-01 ] |
|
https://github.com/MariaDB/server/commit/ebb2db5912ebb9b4e3ef230f15ae65529ff30be4 |
| Comment by Jan Lindström (Inactive) [ 2021-03-02 ] |
|
Added a new wsrep_mode feature DISALLOW_LOCAL_GTID for this. Nodes can have GTIDs for local transactions in the following scenarios:
If user has set wsrep_mode=DISALLOW_LOCAL_GTID these operations produce a error ERROR HY000: Galera replication not supported. |