Skip to content

Fix IllegalStateException for Transaction Producer #19204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

k-raina
Copy link
Contributor

@k-raina k-raina commented Mar 13, 2025

Current Behavior:

  • When a batch fails with a fatal error (e.g., ProducerFencedException), the TM transitions to FATAL state
  • However, subsequent batches that fail can still trigger state transitions through code path Sender.failBatch -> TM.handleFailedBatch > TM.maybeTransitionToErrorState
  • This means that even after entering FATAL state, other batches could potentially transition the TM to ABORTABLE state

Example Scenario:

Batch 1 fails with ProducerFencedException
  ↓
TM transitions to FATAL state
  ↓
Batch 2 fails with UnknownProducerIdException
  ↓
TM incorrectly transitions to ABORTABLE state (this is the bug)

@github-actions github-actions bot added triage PRs from the community producer clients small Small PRs labels Mar 13, 2025
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants