ojasvajain opened a new pull request, #23857: URL: https://github.com/apache/kafka/pull/23857
**Problem** When a producer is closed with an open transaction, the sender thread aborts it and retries the EndTxn request until it succeeds. If the transaction coordinator is unreachable or keeps returning retriable errors, this never ends, so close() without a timeout blocks indefinitely. **Fix** The coordinator expires a transaction after transaction.timeout.ms anyway, so stop retrying the abort after that long. The clock starts when the abort starts, so other work done while closing does not count against it. Waiting for the coordinator node to become ready is capped at the remaining time, so the deadline is not overshot by request.timeout.ms. This applies to both close() and close(Duration): the sender stops itself at the deadline, and a bounded close still force closes at its own timeout, whichever comes first. **TODO** - Add more test cases -- 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]
