cmccabe commented on code in PR #13407: URL: https://github.com/apache/kafka/pull/13407#discussion_r1163353132
########## metadata/src/main/java/org/apache/kafka/controller/QuorumController.java: ########## @@ -1142,9 +1190,20 @@ public ControllerResult<Void> generateRecordsAndResult() throws Exception { "at metadata.version {} from {}.", bootstrapMetadata.records().size(), bootstrapMetadata.metadataVersion(), bootstrapMetadata.source()); records.addAll(bootstrapMetadata.records()); - } else if (featureControl.metadataVersion().equals(MetadataVersion.MINIMUM_KRAFT_VERSION)) { - log.info("No metadata.version feature level record was found in the log. " + + Review Comment: I was thinking that we should extract `CompleteActivationEvent#generateRecordsAndResult` into a static function that can be unit tested. Maybe something like ``` static List<ApiMessageAndVersion> generateActivationRecords( Logger log, boolean logIsEmpty, boolean zkMigrationEnabled, BootstrapMetadata bootstrapMetadata ) { ... } ``` Then we could have some nice unit tests. As it is, it's getting too complex without them. -- 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