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

ParallelSnapshotReader sometimes throws NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.3.0.Alpha1
    • 1.2.0.Final
    • mysql-connector
    • None

    Description

      We ran into this issue recently when trying to add tables to an existing connector:

      Everything runs fine but when getting close to finishing parallel reading, an NPE is thrown:

      [2020-07-28 04:32:31,602] ERROR [dbz-stingray-9|task-0] db.debezium.mysql.stingray Failed due to error: Error processing binlog event (BinlogReader:208)
       July 27th 2020, 21:32:32.415 
       org.apache.kafka.connect.errors.ConnectException
       at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:230)
       at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:207)
       at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:600)
       at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1130)
       at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:978)
       at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:581)
       at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:860)
       at java.lang.Thread.run(Thread.java:748)
       Caused by: java.lang.NullPointerException
       at io.debezium.connector.mysql.ParallelSnapshotReader$ParallelHaltingPredicate.accepts(ParallelSnapshotReader.java:228)
       at io.debezium.connector.mysql.AbstractReader.enqueueRecord(AbstractReader.java:332)
       at io.debezium.heartbeat.HeartbeatImpl.forcedBeat(HeartbeatImpl.java:99)
       at io.debezium.heartbeat.HeartbeatImpl.heartbeat(HeartbeatImpl.java:78)
       at io.debezium.connector.mysql.BinlogReader.handleEvent(BinlogReader.java:586)
       ... 5 more

      the relevant DBZ code line is here: https://github.com/debezium/debezium/blob/master/debezium-connector-mysql/src/main/java/io/debezium/connector/mysql/ParallelSnapshotReader.java#L228

      I'm not totally clear under what circumstances an event will have sourceInfo without a timestamp, but this seems to be what is causing the NPE.

       

      Attachments

        Activity

          People

            moirat Moira Tagle (Inactive)
            moirat Moira Tagle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: