-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-18052: Decouple the dependency of feature stable version to the metadata version #17886
base: trunk
Are you sure you want to change the base?
KAFKA-18052: Decouple the dependency of feature stable version to the metadata version #17886
Conversation
server-common/src/main/java/org/apache/kafka/server/common/TestFeatureVersion.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dongnuo123 : Thanks for the PR. Left a comment.
this.name = name; | ||
this.featureVersions = featureVersions; | ||
this.latestProduction = latestProduction; | ||
|
||
if (defaultValue(MetadataVersion.LATEST_PRODUCTION) > latestProduction.featureLevel()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to further validate the following?
- The dependencies of the latestProduction is in production.
- The dependencies of the default feature is in production and have a level <= the default level of the dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a validation for
- The latest production value >= the default value.
- The dependencies of the latest production value <= their latest production values.
- The dependencies of the default value <= their default values.
The dependencies of the default feature is in production
This is guaranteed when checking The latest production value >= the default value
Currently the validation of feature upgrade relies on the supported version range generated during registration. For a given feature, its max supported feature version in production is set to be the default version value (the latest feature version with bootstrap metadata value smaller or equal to the latest production metadata value).
This patch introduces a
LATEST_PRODUCTION
value independent from the metadata version to each feature so that the highest supported feature version can be customized by the feature owner.The change only applies to dynamic feature upgrade. During formatting, we still use the default value associated the metadata version.
Committer Checklist (excluded from commit message)