Bill Bejeck created KAFKA-21658:
-----------------------------------
Summary: Streams EOS: healthy tasks' outputs are aborted during
corruption handling while their input progress is kept
Key: KAFKA-21658
URL: https://issues.apache.org/jira/browse/KAFKA-21658
Project: Kafka
Issue Type: Bug
Components: streams
Affects Versions: 4.3.2, 4.2.2, 4.4.0, 4.1.2, 4.0.2, 3.9.1
Reporter: Bill Bejeck
Assignee: Lucy Liu
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 message was sent by Atlassian Jira
(v10.3.26#10030026)