Skip to content
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

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

dongnuo123
Copy link
Collaborator

@dongnuo123 dongnuo123 commented Nov 20, 2024

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)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added core Kafka Broker small Small PRs labels Nov 20, 2024
@dongnuo123 dongnuo123 changed the title [Draft] add latest production to features KAFKA-18052: Decouple the dependency of feature stable version to the metadata version Nov 20, 2024
@dongnuo123 dongnuo123 changed the title KAFKA-18052: Decouple the dependency of feature stable version to the metadata version [Draft] KAFKA-18052: Decouple the dependency of feature stable version to the metadata version Nov 20, 2024
@dongnuo123 dongnuo123 changed the title [Draft] KAFKA-18052: Decouple the dependency of feature stable version to the metadata version KAFKA-18052: Decouple the dependency of feature stable version to the metadata version Nov 21, 2024
Copy link
Contributor

@junrao junrao left a 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()) {
Copy link
Contributor

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?

  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.

Copy link
Collaborator Author

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

@github-actions github-actions bot removed the small Small PRs label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Kafka Broker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants