You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "bbejeck (via GitHub)" <gi...@apache.org> on 2026/09/24 21:24:38 UTC
[PR] KAFKA-21159: Clear next offsets to consume on task close to avoid stale commit after revive [kafka]
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21159: Clear next offsets to consume on task close to avoid stale commit after revive [kafka]
Posted by "bbejeck (via GitHub)" <gi...@apache.org>.
bbejeck commented on PR #23584:
URL: https://github.com/apache/kafka/pull/23584#issuecomment-5891896511
Merged #23584 into trunk
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-21159: Clear next offsets to consume on task close to avoid stale commit after revive [kafka]
Posted by "bbejeck (via GitHub)" <gi...@apache.org>.
bbejeck merged PR #23584:
URL: https://github.com/apache/kafka/pull/23584
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org