mjsax commented on code in PR #15315:
URL: https://github.com/apache/kafka/pull/15315#discussion_r1478708058


##########
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:
   Well, we have two possibilities: either go with the hotfix for 3.7, or block 
the release until we can figure out a proper fix, what might take weeks...
   
   Or: maybe revert the change of the producer that we put into 3.6 and take it 
from there (I am not 100% sure, if the producer change was the right think to 
be honest)



-- 
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

Reply via email to