bbejeck opened a new pull request, #24379:
URL: https://github.com/apache/kafka/pull/24379

   Under exactly_once_v2 with the classic group protocol, 
TaskManager#handleCorruption commits the non-corrupted RUNNING tasks before 
closing the corrupted active tasks dirty. It does this because the dirty close 
aborts the thread's ongoing transaction.
   
   If a rebalance is in progress, commitTasksAndMaybeUpdateCommittableOffsets 
returns -1 without committing, and handleCorruption ignores the return value. 
closeDirtyAndRevive then calls RecordCollectorImpl#closeDirty, which calls 
StreamsProducer#abortTransaction. That aborts the shared transaction, including 
the uncommitted outputs of the healthy tasks.
   
   Only the closed tasks get input offset resets. The healthy tasks stay 
RUNNING with their consumed offsets and commitNeeded intact. A later commit, 
for example in handleRevocation, commits those input offsets. The outputs of 
the records processed between the last successful commit and the abort are lost.


-- 
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]

Reply via email to