Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Many JDBC drivers support XA (two phase commit aka Global Transactions or transactions that span multiple databases) including the MariaDB / MySQL JDBC drivers.
Config Option: CONNECT engine JDBC option XA=TRUE then, if the jdbc driver supports XA, to use XA symantics rather than auto commit in transactions involving connect engine JDBC.
SCENARIO: We might modify a local table L1 and a connect jdbc table from datasource A and another connect jdbc table from datasource B and finally a local table L2. If modifying L2 fails for some reason (e.g. SIGNAL from failure of a validation constraint within a trigger) the transaction can be rolled back which would rollback datasource A and datasource B changes.
This seems like it should be reasonable to implement since the JDBC driver architecture already supports the XA symantics as does MariaDB itself and its JDBC driver.
More info here: https://docs.oracle.com/cd/E13218_01/wlp/docs81/sp2/db/5XA.html
This can make MariaDB a hub for a federated transaction with all the benefits that implies.