cmccabe commented on code in PR #18845:
URL: https://github.com/apache/kafka/pull/18845#discussion_r1953113246
##########
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java:
##########
@@ -495,7 +495,9 @@ BrokerFeature processRegistrationFeature(
FinalizedControllerFeatures finalizedFeatures,
BrokerRegistrationRequestData.Feature feature
) {
- int defaultVersion =
feature.name().equals(MetadataVersion.FEATURE_NAME) ? 1 : 0; // The default
value for MetadataVersion is 1 not 0.
+ // The default value for MetadataVersion changes over time while other
features start at `0`
+ int defaultVersion =
feature.name().equals(MetadataVersion.FEATURE_NAME) ?
+ MetadataVersion.MINIMUM_VERSION.featureLevel() : 0;
Review Comment:
If we're dropping support for everything before 3.3 we can always count on
having a FeatureRecord for `metadata.version`. However doing this may require a
lot of code changes since many junit tests may initialize with an empty log.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]