You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/05/26 23:33:27 UTC

[GitHub] [kafka] cmccabe commented on a diff in pull request #12207: MINOR: Several fixes and improvements for FeatureControlManager

cmccabe commented on code in PR #12207:
URL: https://github.com/apache/kafka/pull/12207#discussion_r883156221


##########
metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java:
##########
@@ -208,19 +218,6 @@ private ApiError updateMetadataVersion(
         boolean allowUnsafeDowngrade,
         Consumer<ApiMessageAndVersion> recordConsumer
     ) {
-        Optional<VersionRange> quorumSupported = quorumFeatures.quorumSupportedFeature(MetadataVersion.FEATURE_NAME);
-        if (!quorumSupported.isPresent()) {
-            return invalidMetadataVersion(newVersionLevel, "The quorum does not support metadata.version.");
-        }
-
-        if (newVersionLevel <= 0) {

Review Comment:
   I was thinking about this too.
   
   I would like to get rid of `MetadataVersion.UNINITIALIZED` as a concept. There are a few places where the MV isn't stored and it should be (pre-3.3 snapshots, for example) but we can just treat those as `MetadataVersion.3_3_0IV1`
   
   That would allow us to just say that MV for a kraft cluster was always > 0
   
   But this PR was already getting too big so I held off on that.



##########
metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java:
##########
@@ -208,19 +218,6 @@ private ApiError updateMetadataVersion(
         boolean allowUnsafeDowngrade,
         Consumer<ApiMessageAndVersion> recordConsumer
     ) {
-        Optional<VersionRange> quorumSupported = quorumFeatures.quorumSupportedFeature(MetadataVersion.FEATURE_NAME);
-        if (!quorumSupported.isPresent()) {
-            return invalidMetadataVersion(newVersionLevel, "The quorum does not support metadata.version.");
-        }
-
-        if (newVersionLevel <= 0) {

Review Comment:
   I was thinking about this too.
   
   I would like to get rid of `MetadataVersion.UNINITIALIZED` as a concept. There are a few places where the MV isn't stored and it should be (pre-3.3 snapshots, for example) but we can just treat those as `MetadataVersion.3_0_0IV1`
   
   That would allow us to just say that MV for a kraft cluster was always > 0
   
   But this PR was already getting too big so I held off on that.



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org