bbejeck opened a new pull request, #23584: URL: https://github.com/apache/kafka/pull/23584
A revived active task (`closeDirtyAndRevive`) kept `nextOffsetsAndMetadataToBeConsumed` from before the corruption. After the consumer is seeked back to its committed offset, a commit driven by processor metadata (`needsCommit`, which commits all input partitions) could fall back to that stale next offset and commit past records the task hasn't reprocessed. Fix: clear `nextOffsetsAndMetadataToBeConsumed` in `StreamTask.close()`, alongside `consumedOffsets`, so a revived task has no stale fallback for a partition it hasn't re-read. Testing: added `StreamTaskTest.shouldNotCommitStaleNextOffsetForPartitionNotReReadAfterRevive`, which reproduces the revive scenario and fails without the fix. Full `StreamTaskTest` passes. -- 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]
