Skip to content

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

Open
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
nileshkumar3:KAFKA-20077-tx-v1-flush-hang
Open

KAFKA-20077: Prevent infinite AddPartitionsToTxn retries causing producer.flush() to hang#21672
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
nileshkumar3:KAFKA-20077-tx-v1-flush-hang

Conversation

@nileshkumar3
Copy link

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
Author

@lianetm Can you please review this

@nileshkumar3
Copy link
Author

@lucasbru Can you please review this

@nileshkumar3
Copy link
Author

@hachikuji Can you please review this?

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

Labels

clients producer small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant