ijuma commented on code in PR #15315: URL: https://github.com/apache/kafka/pull/15315#discussion_r1478618824
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsProducer.java: ########## @@ -343,6 +343,19 @@ void abortTransaction() { // something else (e.g. task corrupted) we can still ignore the exception here // since transaction already got aborted by brokers/transactional-coordinator if this happens log.debug("Encountered {} while aborting the transaction; this is expected and hence swallowed", error.getMessage()); + } catch (final IllegalStateException maybeSwallow) { + // cf https://issues.apache.org/jira/browse/KAFKA-16221 + // this is a hotfix for 3.7 release to just detect this edge case and swallow the exception + // a proper fix would skip calling `abortTransaction` to begin with + final String errorMessage = maybeSwallow.getMessage(); + if (errorMessage == null || !errorMessage.endsWith("Invalid transition attempted from state FATAL_ERROR to state ABORTABLE_ERROR")) { Review Comment: Ouch, this is very fragile - are we working on the proper fix as well? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org