mjsax opened a new pull request, #24313: URL: https://github.com/apache/kafka/pull/24313
A member reports per-task changelog offset sums and end-offset sums to the broker, which computes a task's lag from both. The two came from different threads: the stream thread published the offset sums in each iteration of its loop, while the state updater published the end-offset sums of the tasks it restores or updates. When a task finished restoring while its stream thread was busy, the state updater dropped the task's end-offset sum, but the stream thread kept reporting its offset sum. The broker saw an offset sum without an end-offset sum, took the active task to still be restoring, and did not warm up its migration to another member, which then restored the task from scratch. The state updater now publishes the offset sums of the tasks it restores, updates, or has paused, together with the end-offset sums, as one snapshot. The stream thread's snapshot excludes the tasks the state updater holds, and TaskManager combines both snapshots when the heartbeat reads them. The heartbeat read the offset sums and end-offset sums through two separate suppliers, so it could still pair maps from two different snapshots. StreamsRebalanceData now takes a single supplier of TaskOffsetSums, which the heartbeat calls once per request. Each field is still sent only if it changed since the last heartbeat. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
