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

Improve TaskMigratedException handling on Stream thread

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: streams
    • Labels:
      None

      Description

      Today we handle TaskMigratedException as one-task at a time, when 1) producer got fenced, 2) consumer got fenced, 3) adding records to closed tasks.

      When 1) and 2) happens, all tasks hosted by that thread should have migrated; and for 3) it only happens when we are closing a task but not clearing its corresponding record buffer.

      So a better exception handling is first better fixing 3) to also clear the record buffer when closing a task (clean or dirty), and then for 1/2) we can always treat it as all-tasks-are-migrated.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                guozhang Guozhang Wang
                Reporter:
                guozhang Guozhang Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: