cmccabe commented on code in PR #14208:
URL: https://github.com/apache/kafka/pull/14208#discussion_r1295074841


##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -1200,6 +1235,16 @@ public static List<ApiMessageAndVersion> 
generateActivationRecords(
                     throw new RuntimeException("Should not have ZK migrations 
enabled on a cluster running metadata.version " + 
featureControl.metadataVersion());
                 }
             }
+
+            if (inTransaction) {
+                if 
(!featureControl.metadataVersion().isMetadataTransactionSupported()) {
+                    throw new RuntimeException("Detected in-progress 
transaction, but the metadata.version " + featureControl.metadataVersion() +
+                        " does not support transactions. Cannot continue.");
+                } else {
+                    log.warn("Detected in-progress transaction during 
controller activation. Aborting this transaction.");

Review Comment:
   I think we should include the start transaction offset in the log message 
(if you want, pass an OptionalLong to this function rather than a boolean?) 
That helps match up the beginning of the transaction with where it ends.
   
   Also should fill in that "reason" field, presumably with something like 
"controller failover"



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