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

Postgres Debezium stuck in RUNNING state after unhandled exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • None
    • postgresql-connector
    • None
    • Hide

      Create a table on postgres .
      Add 1 record data in postgres table
      Run an SMT on top of it.
      Somehow make it fail.
      Exception occurred - java.util.concurrent.ExecutionException: Source and Schema Registry column counts differ - OK
      org.apache.kafka.connect.runtime.WorkerTask:180 - WorkerSourceTask{id=postgres-it-01-0} Task is being killed and will not recover until manually restarted - OK
      [ERROR] 2020-08-04 17:54:20,170 pool-7-thread-1 org.apache.kafka.connect.runtime.WorkerSourceTask:509 - WorkerSourceTask{id=postgres-it-01-0} Exception thrown while calling task.commit() - OK

      {
      "connector":

      { "state": "RUNNING", "worker_id": "xxxxxxxx:-1" }

      ,
      "name": "postgres-it-01",
      "tasks": [

      { "id": 0, "state": "RUNNING", "worker_id": "xxxxxxxx:-1" }

      ],
      "type": "source"
      } ---- Not OK

      Show
      Create a table on postgres . Add 1 record data in postgres table Run an SMT on top of it. Somehow make it fail. Exception occurred - java.util.concurrent.ExecutionException: Source and Schema Registry column counts differ - OK org.apache.kafka.connect.runtime.WorkerTask:180 - WorkerSourceTask{id=postgres-it-01-0} Task is being killed and will not recover until manually restarted - OK [ERROR] 2020-08-04 17:54:20,170 pool-7-thread-1 org.apache.kafka.connect.runtime.WorkerSourceTask:509 - WorkerSourceTask{id=postgres-it-01-0} Exception thrown while calling task.commit() - OK { "connector": { "state": "RUNNING", "worker_id": "xxxxxxxx:-1" } , "name": "postgres-it-01", "tasks": [ { "id": 0, "state": "RUNNING", "worker_id": "xxxxxxxx:-1" } ], "type": "source" } ---- Not OK

    Description

      If an exception was thrown during task execution, then Task stucks in running state.. We cannot detect failure and restart the task.

      Expected result:
      Task changes its state to failed just after exception been thrown.

      Actual result:
      Task remains in RUNNING state.

      A little context what we are doing. We have an SMT which transforms the debezium connect record into our AVRO schema. When any message transformation failed we throw an exception and task.commit is called by postgres debezium connector to flush the latest LSN value to postgres. This is stuck in infinite loop and task remains in RUNNING state.
      This is all happening in streaming mode

      Attachments

        Activity

          People

            Unassigned Unassigned
            karandeep_singh Karandeep Singh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: