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

Include MySQL's error code when connector throws ServerException

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Minor
    • 0.3.1, 0.4
    • 0.3
    • mysql-connector
    • None

    Description

      When the MySQL connector is processing the binlog and the server returns an error, the binlog client library will throw a ServerException such as the following:

      ERROR Task mysql-source-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:142)
      org.apache.kafka.connect.errors.ConnectException: com.github.shyiko.mysql.binlog.network.ServerException: could not find next log; the first event 'mysql-bin.000001' at 4747, the last event read from './mysql-bin.000001' at 4870, the last byte read from './mysql-bin.000001' at 4870.
      

      ServerException actually has the MySQL state and error code, but the way the connector is (not) handling this means that just the message part of the exception is reported to Kafka Connect and the log. Instead, the connector should make sure the MySQL state and error code are included in the exception message so that they are recorded.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: