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

Embedded MySqlConnector "Unable to find minimal snapshot lock mode" since 2.5.4.Final

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.7.4.Final, 3.0.1.Final
    • 2.6.0.Final, 2.6.2.Final, 2.6.3.Final, 2.7.0.Final, 2.7.1.Final, 2.7.2.Final, 2.7.3.Final
    • None
    • False
    • None
    • False
    • Important

      What Debezium connector do you use and what version?

       
      MySqlConnector
      Debezium versions:

      • 2.6.0.Final
      • 2.6.1.Final
      • 2.6.2.Final
      • 2.7.0.Final
      • 2.7.1.Final
      • 2.7.2.Final
      • 2.7.3.Final

        What is the connector configuration?

       

      name=engine
      connector.class=io.debezium.connector.mysql.MySqlConnector
      tombstones.on.delete=false
      provide.transaction.metadata=false
      event.processing.failure.handling.mode=fail
      decimal.handling.mode=string
      time.precision.mode=adaptive_time_microseconds
      schema.history.internal=io.debezium.storage.file.history.FileSchemaHistory
      schema.history.internal.file.filename=/tmp/schemahistory.dat
      schema.history.internal.store.only.captured.tables.ddl=true
      schema.history.internal.store.only.captured.databases.ddl=true
      offset.storage.file.filename=/tmp/offsets.dat
      offset.storage=org.apache.kafka.connect.storage.FileOffsetBackingStore
      skipped.operations=t
      notification.enabled.channels=log
      signal.enabled.channels=source
      offset.flush.interval.ms=60000
      errors.max.retries=5
      database.query.timeout.ms=600000
      event.converting.failure.handling.mode=warn
      snapshot.locking.mode=minimal
      min.row.count.to.stream.results=1000
      streaming.delay.ms=0
      snapshot.lock.timeout.ms=10000
      snapshot.max.threads=1
      snapshot.tables.order.by.row.count=disabled

       

      What is the captured database version and mode of deployment?

      Docker image, mysql:8.0.39

      What behavior do you expect?

      I expect that the connector starts and is able to snapshot properly as it was on version 2.5.4.Final

      What behavior do you see?

      In all of the versions since 2.5.4.Final when starting up the connector fails with the following exception stack trace:

      io.debezium.DebeziumException: Unable to create service io.debezium.snapshot.SnapshotterService
              at io.debezium.service.DefaultServiceRegistry.createService(DefaultServiceRegistry.java:231)
              at io.debezium.service.DefaultServiceRegistry.initializeService(DefaultServiceRegistry.java:204)
              at io.debezium.service.DefaultServiceRegistry.getService(DefaultServiceRegistry.java:79)
              at io.debezium.service.spi.ServiceRegistry.tryGetService(ServiceRegistry.java:40)
              at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:118)
              at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:227)
              at io.debezium.embedded.EmbeddedEngine.startSourceTask(EmbeddedEngine.java:636)
              at io.debezium.embedded.EmbeddedEngine.run(EmbeddedEngine.java:448)
              at io.debezium.embedded.ConvertingEngineBuilder$1.run(ConvertingEngineBuilder.java:163)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
              at java.base/java.lang.Thread.run(Thread.java:1583)
      Caused by: io.debezium.DebeziumException: Unable to create service io.debezium.snapshot.spi.SnapshotLock
              at io.debezium.service.DefaultServiceRegistry.createService(DefaultServiceRegistry.java:231)
              at io.debezium.service.DefaultServiceRegistry.initializeService(DefaultServiceRegistry.java:204)
              at io.debezium.service.DefaultServiceRegistry.getService(DefaultServiceRegistry.java:79)
              at io.debezium.service.spi.ServiceRegistry.tryGetService(ServiceRegistry.java:40)
              at io.debezium.snapshot.SnapshotterServiceProvider.createService(SnapshotterServiceProvider.java:62)
              at io.debezium.snapshot.SnapshotterServiceProvider.createService(SnapshotterServiceProvider.java:30)
              at io.debezium.service.DefaultServiceRegistry.createService(DefaultServiceRegistry.java:115)
              at io.debezium.service.DefaultServiceRegistry.createService(DefaultServiceRegistry.java:224)
              ... 11 more
      Caused by: io.debezium.DebeziumException: Unable to find minimal snapshot lock mode. Please check your configuration.
              at io.debezium.snapshot.SnapshotLockProvider.lambda$createService$2(SnapshotLockProvider.java:58)
              at java.base/java.util.Optional.orElseThrow(Optional.java:403)
              at io.debezium.snapshot.SnapshotLockProvider.createService(SnapshotLockProvider.java:58)
              at io.debezium.snapshot.SnapshotLockProvider.createService(SnapshotLockProvider.java:28)
              at io.debezium.service.DefaultServiceRegistry.createService(DefaultServiceRegistry.java:115)
              at io.debezium.service.DefaultServiceRegistry.createService(DefaultServiceRegistry.java:224)
              ... 18 more 

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

      Yes, all versions since 2.5.4.Final exhibit the same behaviour.

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

      Yes

      How to reproduce the issue using our tutorial deployment?

      Setup a Debezium Engine / Embedded project with the MySQL connector and with or without the snapshot.locking.mode=minimal configuration.

              rh-ee-mvitale Mario Fiore Vitale
              lucas.anderson@block64.com Lucas Anderson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: