Skip to content

KAFKA-20077: Prevent infinite AddPartitionsToTxn retries causing producer.flush() to hang - #21672

Open
nileshkumar3 wants to merge 2 commits into
apache:trunkfrom
nileshkumar3:KAFKA-20077-tx-v1-flush-hang
Open

nileshkumar3 wants to merge 2 commits into
apache:trunkfrom
nileshkumar3:KAFKA-20077-tx-v1-flush-hang

Conversation

@nileshkumar3

Copy link
Copy Markdown
Contributor

Root Cause
The AddPartitionsToTxn handler may repeatedly re-enqueue itself on
retriable errors without any client-side timeout bounding the retry loop.
If the topic is deleted during this phase, the client may never make
progress and producer.flush() may block indefinitely.

Fix
Track the first retriable error timestamp and fail the request if
retries exceed transaction.timeout.ms.

@github-actions github-actions Bot added triage PRs from the community producer clients small Small PRs labels Mar 8, 2026
@nileshkumar3

Copy link
Copy Markdown
Contributor Author

@lianetm Can you please review this

@github-actions

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions Bot added stale Stale PRs and removed needs-attention stale Stale PRs labels Jul 14, 2026
@github-actions

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions Bot added stale Stale PRs and removed needs-attention stale Stale PRs labels Oct 15, 2026
@github-actions

Copy link
Copy Markdown

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.

@lianetm lianetm added ci-approved and removed triage PRs from the community needs-attention labels Oct 20, 2026
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