urbandan commented on code in PR #12392:
URL: https://github.com/apache/kafka/pull/12392#discussion_r923486245
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -728,18 +779,11 @@ synchronized void maybeResolveSequences() {
} else {
// We would enter this branch if all in flight batches
were ultimately expired in the producer.
if (isTransactional()) {
- // For the transactional producer, we bump the epoch
if possible, otherwise we transition to a fatal error
+ // For the transactional producer, we bump the epoch
if possible, then transition to a fatal error
Review Comment:
The existing epochBumpRequired flag is used to bump the epoch after an
abort. It is usually used to reset the sequence numbers for the producer, and
keeps the producer in a usable state.
In the case I'm trying to fix, we have to skip the abort, and immediately go
to the bump. This means that the producer will bump during a transaction, which
is handles as a fence by the coordinator. Because of this, there is no way to
safely get a new (bumped) epoch with this specific producer instance, and we
need to handle this case as a fatal error.
After the InitProducerIDRequest was successful, we transition into the old
FATAL_ERROR state.
--
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]