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

Fix warn log if snapshot mode when needed is required but is not set

XMLWordPrintable

      If the required binlog file position is not available and the snapshot mode is not when_needed, the connector logs a warning

      The connector is trying to read redo log starting at <>, but this is no longer available on the server. Reconfigure the connector to use a snapshot when needed if you want to recover. If not the connector will streaming from the last available position in the log.
      

      This implies that connector would start working from the last available position in the log. However, since the binlog position which connector requires to resume is no more present, it will fail when it starts streaming with the below exception.

      [2025-06-05 07:42:33,776] [blc-127.0.0.1:3307] ERROR [perconaConn-7755|task-0] Producer failure (io.debezium.pipeline.ErrorHandler:52)
      io.debezium.DebeziumException: Could not find first log file name in binary log index file Error code: 1236; SQLSTATE: HY000.
      	at io.debezium.connector.v2.binlog.BinlogStreamingChangeEventSource.wrap(BinlogStreamingChangeEventSource.java:1212)
      	at io.debezium.connector.v2.binlog.BinlogStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(BinlogStreamingChangeEventSource.java:1258)
      	at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1110)
      	at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:657)
      	at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:959)
      	at java.base/java.lang.Thread.run(Thread.java:1583)
      Caused by: com.github.shyiko.mysql.binlog.network.ServerException: Could not find first log file name in binary log index file
      	at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1074)
      	... 3 more
      

      Solution

      We want to throw a DebeziumException in this case, as was happening in the earlier versions. Refer the code from v2.4.2.

              Unassigned Unassigned
              akanimesh7 Animesh Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: