[MDEV-17791] CONNECT Engine JDBC to support auto XA (Automatic Two Phase Commit of External Data) Created: 2018-11-22  Updated: 2018-11-22

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Connect
Fix Version/s: None

Type: Task Priority: Major
Reporter: Robert Dyas Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 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.



 Comments   
Comment by Robert Dyas [ 2018-11-22 ]

We are requesting this for inclusion in the 10.4 branch and are willing to help with design, testing, etc.

Generated at Thu Feb 08 08:39:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.