ableegoldman commented on pull request #9515: URL: https://github.com/apache/kafka/pull/9515#issuecomment-717691656
> Although, as I'm typing this, I'm realizing the bug is probably that when the task is initialized, we'd report some high offsetSum, which the assignor interprets as a low lag, and when it's not initialized, then we report nothing, which the assignor interprets as a high lag (since the assignor will independently verify if it's a stateless task or not). Exactly. It shouldn't report different offset sums in two adjacent rebalances if nothing changed except that it was assigned a task. One way to look at it is if we had just waited slightly longer to rejoin the group, then the task would have been initialized with the checkpoint offsets anyway, so the checkpoint file is the source of truth while the task is still in CREATED. If the checkpoint file is empty (and the task uninitialized), then we _should_ report no offsets for that task because it doesn't have any actual state. Skipping the offset sum is technically how we handle stateless tasks, but it's also what happens for any stateful task we just don't happen to find on disk. Which is exactly what the task would be if the checkpoint is empty ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org