Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-15252

Task is not stopped until the poll interval passes in case of task restarting.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • connect
    • None

    Description

      We face a problem with restarting of the tasks, sometimes it leads to resource leak. 

      We used the jdbc source connector and noticed an increasing of count of opened sessions on Vertica side. But this problem is applicable for all databases and possibly for all source connectors.

      Our case is the next: 

      1) Run jdbc source connector (io.confluent.connect.jdbc.JdbcSourceConnector) and set poll.interval.ms (86400000) > task.shutdown.graceful.timeout.ms (it's the property on Kafka-connect side, we set 10000)

      2) Send POST /connectors/<connector_name>/tasks/<task_number>/restart

      ER: count of session is the same as before restart

      AR: count of session increases

      The main problem is when org.apache.kafka.connect.runtime.Worker#stopAndAwaitTasks(java.util.Collection<org.apache.kafka.connect.util.ConnectorTaskId>)  method is called it doesn't stop a source task itself. 
      The source task stops only if polling process stops on source task side. 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nikita.krasnov Nikita
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: