chia7712 commented on code in PR #20021: URL: https://github.com/apache/kafka/pull/20021#discussion_r2173227692
########## metadata/src/main/java/org/apache/kafka/image/loader/MetadataLoader.java: ########## @@ -345,7 +347,23 @@ private void maybePublishMetadata(MetadataDelta delta, MetadataImage image, Load } } metrics.updateLastAppliedImageProvenance(image.provenance()); - metrics.setCurrentMetadataVersion(image.features().metadataVersionOrThrow()); + MetadataVersion metadataVersion = image.features().metadataVersionOrThrow(); + metrics.setCurrentMetadataVersion(metadataVersion); + + // Set the metadata version feature level, since it is handled separately from other features + metrics.recordFinalizedFeatureLevel( + MetadataVersion.FEATURE_NAME, + metadataVersion.featureLevel() + ); + + // Set all production feature levels from the image, defaulting to their minimum production values + for (var feature : Feature.PRODUCTION_FEATURES) { Review Comment: > If the feature does not have a finalized level, it does not have a finalizedLevel metric? Yes, that is what I meant -- 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