junrao commented on code in PR #17886:
URL: https://github.com/apache/kafka/pull/17886#discussion_r1852691003
##########
server-common/src/main/java/org/apache/kafka/server/common/Features.java:
##########
@@ -53,10 +53,21 @@ public enum Features {
private final String name;
private final FeatureVersion[] featureVersions;
+ // The latest production version of the feature, owned and updated by the
feature owner
+ // in the respective feature definition. The value should not be smaller
than the default
+ // value calculated with {@link #defaultValue(MetadataVersion)}.
+ private final FeatureVersion latestProduction;
+
Features(String name,
- FeatureVersion[] featureVersions) {
+ FeatureVersion[] featureVersions,
+ FeatureVersion latestProduction) {
this.name = name;
this.featureVersions = featureVersions;
+ this.latestProduction = latestProduction;
+
+ if (defaultValue(MetadataVersion.LATEST_PRODUCTION) >
latestProduction.featureLevel()) {
Review Comment:
Do we need to further validate the following?
1. The dependencies of the latestProduction is in production.
2. The dependencies of the default feature is in production and have a level
<= the default level of the dependency.
--
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]