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

Support retrying database connection failures during connector start

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 2.2.0.Alpha1
    • None
    • core-library
    • None
    • False
    • None
    • False

      When a database connection is lost while a connector is running, the exception will be thrown and retried due to how the BaseSourceTask#poll method works.

      The problem is if the database connection isn't restored by the time the Kafka Connect environment restarts the connector and calls BaseSourceTask#start, the connector will enter a FAILED status and will be terminated because Kafka Connect does not support the notion of RetriableException handling during the start-up of a connector.

      We should introduce a connection retry mechanism, similar to slot.max.retries and slot.retry.delay.ms but where we will attempt to retry connecting to the database from within the BaseSourceTask#start method before throwing an exception, making the lifecycle of the connector more resilient.

      Settings these values to 0 would retain current behavior, and perhaps that would be the ideal default value during 2.0, but giving users the ability to opt-in to this retry behavior as needed?

            Unassigned Unassigned
            ccranfor@redhat.com Chris Cranford
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: