Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-5624

debezium-connector-mysql should handle XA transactions

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Unresolved
    • Major
    • 2.2-backlog
    • None
    • mysql-connector
    • None
    • False
    • None
    • False
    • 0
    • 0% 0%

    Description

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      I've tried to use Debezium as the CDC tool to propagate our data from source which is a MySQL instance to our data warehouse. But we have encountered a problem about XA transaction handling:

      We use XA transations for distributed transactions across our distributed database system. The committed XA transations were handled as expected, but the rollbacked ones were not. As we dived deep into the implementation of debezium-connector-mysql we found the reason was that this connector would simply ignore events of XA transactions. So once the source MySQL writes down a binlog by the command "XA prepare xxx", debezium-connector-mysql will process this binlog event and emit the corresponding ChangeEvents consist of the data change between the "XA start xxx" and "XA prepare xxx". However, if the source MySQL rollbacks this XA transaction and produce the relevant binlog, debezium-connector-mysql will just skip rather than handle this binlog event. Hence the downstream of debezium-connector-mysql has no chance to catch this rollback operation, but to apply the already rollbacked data on our data warehouse directly, which had led to date inconsistency bewtween our souce MySQL and data warehouse.

      Implementation ideas (optional)

      It will be perfect if debezium-connector-mysql handles the XA transations. Which means it should only emit those data change events belong to the corresponding XA transations which have already committed successfully.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vwagen Wu Xiang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: