[ 
https://issues.apache.org/jira/browse/KAFKA-21576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias J. Sax updated KAFKA-21576:
------------------------------------
    Priority: Minor  (was: Major)

> Streams client can report an active task's offset without its end offset 
> after the task finished restoring
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-21576
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21576
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 4.4.0
>            Reporter: Matthias J. Sax
>            Assignee: Matthias J. Sax
>            Priority: Minor
>             Fix For: 4.5.0, 4.4.1
>
>
> Under the streams group protocol, a client reports the changelog offsets of 
> the active tasks it is restoring, and their end offsets. The coordinator 
> treats an active task with a reported offset as restoring. With an end 
> offset, it can tell whether the task is caught up.
> The client computes the two values on different threads:
>  * TaskManager.maybeUpdateTaskOffsetSumSnapshot() runs on the stream thread, 
> once per runOnce(). It reports the offset of every assigned task that is not 
> RUNNING.
>  * DefaultStateUpdater.updateTaskEndOffsetSumSnapshot() runs on the state 
> updater thread, once per loop. It computes end offsets only for the tasks the 
> state updater is still restoring or updating.
> Once the state updater completes an active task's restore, it drops the 
> task's end offset right away. The task's offset stays in the stream thread's 
> snapshot until that thread recomputes the snapshot after taking over the 
> restored task. In between, the client reports the task with an offset and 
> without an end offset. The coordinator sees the owner as restoring with an 
> unknown lag. The warm-up refiner then counts the owner's state as not usable, 
> and moves the task cold when the target assignment gives it to another member.
> The gap lasts as long as the stream thread is busy, for example processing a 
> record that takes long or running a punctuation. The heartbeat thread keeps 
> sending the stale offset in the meantime.



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

Reply via email to