mirror of
https://github.com/MariaDB/server.git
synced 2026-02-04 09:49:07 +01:00
Issue: On galera write node INSERT statements does not acquire MDL locks on it's all child tables and thereby wsrep certification keys are also added for limited tables, but on applier nodes it does acquire MDL locks for all child tables. This can result into MDL BF-BF conflict on applier node when transactions referring to parent and child tables are executed concurrently. For example: Tables with foreign keys: t1<-t2<-t3<-t4 Conflicting transactions: INSERT t1 and DROP TABLE t4 Wsrep certification keys taken on write node: - for INSERT t1: t1 and t2 - for DROP TABLE t4: t4 On applier node MDL BF-BF conflict happened between two transaction because MDL locks on t1, t2, t3 and t4 were taken for INSERT t1, which conflicted with MDL lock on t4 taken by DROP TABLE t4. The Wsrep certification keys helps in resolving this MDL BF-BF conflict by prioritizing and scheduling concurrent transactions. But to generate Wsrep certification keys it needs to open and take MDL locks on all the child tables. On applier nodes Write_rows event is implicitly a REPLACE, deleting all conflicting rows which can cause cascading FK actions and locks on foreign key children tables. Solution: For Galera applier nodes the Write_rows event is considered pure INSERT which will never cause cascading FK actions and locks on foreign key children tables. |
||
|---|---|---|
| .. | ||
| include | ||
| r | ||
| t | ||
| disabled.def | ||
| galera_2nodes.cnf | ||
| galera_2nodes_as_master.cnf | ||
| galera_2nodes_as_replica_2primary.cnf | ||
| galera_2nodes_as_slave.cnf | ||
| galera_2x2nodes.cnf | ||
| galera_3nodes_as_slave.cnf | ||
| galera_4nodes.cnf | ||
| my.cnf | ||
| suite.pm | ||