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

MySql master switch during connector being offline leads to data loss

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Blocker Blocker
    • None
    • 0.10.0.Final
    • None
    • None
    • Hide

      Steps to reproduce:

      • MySql cluster is running in a master-slave topology with several slaves. Connector is connected to slave_1.
      • Stop connector (by stopping Kafka connect worker or pausing a connector)
      • Perform MySql master switch (promote slave_2 to new master)
      • Start connector

      Expected behaviour:

      • connector connects to slave_1 in exact same place it has stopped at

      Actual behaviour:

      • New GTID entry will be added to GTID set because of a master switch
      • slave_1 server returns updated GTID set to connector (inside of which at least one entry has not been seen previously by connector)
      • Connector calculates a new "merged" GTID set and misses transactions that were accepted by new master during the time connector was offline
      Show
      Steps to reproduce: MySql cluster is running in a master-slave topology with several slaves. Connector is connected to slave_1. Stop connector (by stopping Kafka connect worker or pausing a connector) Perform MySql master switch (promote slave_2 to new master) Start connector Expected behaviour: connector connects to slave_1 in exact same place it has stopped at Actual behaviour: New GTID entry will be added to GTID set because of a master switch slave_1 server returns updated GTID set to connector (inside of which at least one entry has not been seen previously by connector) Connector calculates a new "merged" GTID set and misses transactions that were accepted by new master during the time connector was offline

      If MySql master switch happens while Debezium connector is offline (paused), connector incorrectly calculates new "merged" GTID set, leading to replication data loss.

      Please see Kafka Connect logs attached

        1. logs.txt
          4 kB
          Ruslan Gibaiev

              jpechane Jiri Pechanec
              rgibaiev Ruslan Gibaiev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: