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

MySqlReadOnlyIncrementalSnapshotChangeEventSource enforces Kafka dependency during initialization

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.0.CR1
    • 2.3.0.Beta1
    • mysql-connector
    • None
    • False
    • None
    • False
    • Important

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

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      2.30.-beta1

      What is the connector configuration?

       
      .with(MySqlConnectorConfig.READ_ONLY_CONNECTION, true)
      .with(CommonConnectorConfig.SIGNAL_ENABLED_CHANNELS, "file")
      .with(FileSignalChannel.SIGNAL_FILE, "/tmp/signal.txt")

      What is the captured database version and mode of depoyment?

      (E.g. on-premises, with a specific cloud provider, etc.)

      MySQL 5.6

      What behaviour do you expect?

      I am using FileSignalChannel with no Kafka so expect MySqlReadOnlyIncrementalSnapshotChangeEventSource to be initialized successfully without any Kafka dependencies when using a channel other than Kafka.

      What behaviour do you see?

      Get an NPE since Kafka is not configured

       

      [exec] java.lang.NullPointerException: null
      [exec] at io.debezium.pipeline.signal.actions.snapshotting.ExecuteSnapshot.arrived(ExecuteSnapshot.java:57)
      [exec] at io.debezium.pipeline.signal.SignalProcessor.processSignal(SignalProcessor.java:183)
      [exec] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      [exec] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
      [exec] at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
      [exec] at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)

      Do you see the same behaviour using the latest relesead Debezium version?

      (Ideally, also verify with latest Alpha/Beta/CR version)

      See it on 2.3.0-beta1

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      [exec] java.lang.NullPointerException: null
      [exec] at io.debezium.pipeline.signal.actions.snapshotting.ExecuteSnapshot.arrived(ExecuteSnapshot.java:57)
      [exec] at io.debezium.pipeline.signal.SignalProcessor.processSignal(SignalProcessor.java:183)
      [exec] at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      [exec] at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
      [exec] at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
      [exec] at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)

      How to reproduce the issue using our tutorial deployment?

      Use the configuration I shared and don't have any kaka configuration.

      Feature request or enhancement

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

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

      This will allow us in adopting debezium since we are looking to use a read-only database without Kafka dependency.

      Implementation ideas (optional)

      public void init(MySqlPartition partition, OffsetContext offsetContext) {
      super.init(partition, offsetContext);

      {{ Long signalOffset = getContext().getSignalOffset();
      if (signalOffset != null) {
      dispatcher.seek(signalOffset)
      }
      }}}
      may remove hard dependencies but I will leave it to the authors to find a fix and make it available. This is a complete blocker otherwise.

              rh-ee-mvitale Mario Fiore Vitale
              labscst Kunal Sinha
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: