sanghyeok An created KAFKA-21696:
------------------------------------

             Summary: Update input partitions for existing standby and warm-up 
tasks on reassignment
                 Key: KAFKA-21696
                 URL: https://issues.apache.org/jira/browse/KAFKA-21696
             Project: Kafka
          Issue Type: Bug
          Components: clients, streams
            Reporter: sanghyeok An
            Assignee: sanghyeok An


*Description*

This is a follow-up to {*}KAFKA-21188{*}. During reconciliation, KAFKA-21188 
uses local metadata to resolve the input partitions for active, standby, and 
warm-up tasks and passes them to {{TaskManager}} through 
{{{}onTasksAssigned(){}}}.

When a standby task managed by {{StateUpdater}} remains a standby after 
reassignment, {{TaskManager.handleTasksInStateUpdater()}} reuses the existing 
task. If the callback supplies a different set of input partitions, the task’s 
{{inputPartitions()}} still returns the previous set. Warm-up tasks are also 
affected because they run as {{StandbyTask}} instances.

 

*Example*
 # Input topic {{A}} has one partition and {{B}} has three. Standby task 
{{0_2}} is assigned {{{B-2}}} as its input partitions.
 # {{A}} grows to three partitions. A change to another task’s assignment 
triggers reconciliation. Task {{0_2}} remains a standby, and 
{{onTasksAssigned()}} supplies {{{A-2, B-2}}} as its new input partitions.
 # The existing {{StandbyTask}} still reports {{{}{B-2}{}}}, so 
{{metadataForLocalThreads()}} omits {{{}A-2{}}}. If {{0_2}} is later promoted 
to active with {{{}{A-2, B-2}{}}}, Kafka Streams may log a {{Detected unmatched 
input partitions}} warning. Promotion succeeds, and the new active task uses 
both partitions.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to