sanghyeok An created KAFKA-21688:
------------------------------------

             Summary: Consider a fallback for Streams group warm-up tasks that 
cannot catch up
                 Key: KAFKA-21688
                 URL: https://issues.apache.org/jira/browse/KAFKA-21688
             Project: Kafka
          Issue Type: Improvement
          Components: group-coordinator, streams
            Reporter: sanghyeok An
            Assignee: sanghyeok An


With warm-up enabled, {{AssignmentRefinerImpl}} can keep a stateful task active 
on its current owner while the target member restores the task in the 
background. If the target member’s changelog lag stays above 
{{{}acceptable.recovery.lag{}}}, the handoff can remain pending indefinitely 
even while both members are healthy and the target continues to restore state.

For example, suppose the target starts 100,000 offsets behind and the 
acceptable lag is 10,000. If the changelog end offset advances by 5,000 offsets 
per second while the target restores 4,000 offsets per second, the lag grows to 
160,000 after one minute. Every offset report shows forward progress, so a 
timeout based only on an unchanged restore offset would miss this case.

The current owner continues processing, but the group cannot complete the 
intended scale-out for this task. If the migration occupies the group’s only 
warm-up slot, other migrations can also remain pending, including tasks whose 
target members could catch up.

 

*Proposed scope*

Define how the coordinator should handle a sustained failure to close the lag 
gap. Two decisions are worth separating. One is whether to release the warm-up 
slot so another migration can proceed. The other is whether to allow a forced 
handoff, which can interrupt processing while the new active owner restores the 
remaining state. A policy that releases the slot would also need to avoid 
immediately assigning it back to the same migration.

A useful test would use two pending migrations and one warm-up slot. For the 
first task, advance both reported offsets while keeping the lag above the 
threshold. For the second, allow the target to catch up. Verify the intended 
outcome for both tasks, including whether the first task stays available and 
whether the second migration eventually gets the slot.



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

Reply via email to