cmccabe commented on code in PR #18566: URL: https://github.com/apache/kafka/pull/18566#discussion_r1918886933
########## core/src/main/scala/kafka/server/KafkaConfig.scala: ########## @@ -402,28 +391,8 @@ class KafkaConfig private(doLog: Boolean, val props: util.Map[_, _]) val uncleanLeaderElectionCheckIntervalMs: Long = getLong(ReplicationConfigs.UNCLEAN_LEADER_ELECTION_INTERVAL_MS_CONFIG) def uncleanLeaderElectionEnable: java.lang.Boolean = getBoolean(ReplicationConfigs.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG) - // We keep the user-provided String as `MetadataVersion.fromVersionString` can choose a slightly different version (eg if `0.10.0` - // is passed, `0.10.0-IV0` may be picked) - val interBrokerProtocolVersionString = getString(ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG) - val interBrokerProtocolVersion = if (processRoles.isEmpty) { - MetadataVersion.fromVersionString(interBrokerProtocolVersionString) - } else { - if (originals.containsKey(ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG)) { - // A user-supplied IBP was given - val configuredVersion = MetadataVersion.fromVersionString(interBrokerProtocolVersionString) - if (!configuredVersion.isKRaftSupported) { - throw new ConfigException(s"A non-KRaft version $interBrokerProtocolVersionString given for ${ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG}. " + - s"The minimum version is ${MetadataVersion.MINIMUM_KRAFT_VERSION}") - } else { - warn(s"${ReplicationConfigs.INTER_BROKER_PROTOCOL_VERSION_CONFIG} is deprecated in KRaft mode as of 3.3 and will only " + - s"be read when first upgrading from a KRaft prior to 3.3. See kafka-storage.sh help for details on setting " + - s"the metadata.version for a new KRaft cluster.") - } - } - // In KRaft mode, we pin this value to the minimum KRaft-supported version. This prevents inadvertent usage of - // the static IBP config in broker components running in KRaft mode - MetadataVersion.MINIMUM_KRAFT_VERSION - } + // TODO: remove this. + val interBrokerProtocolVersion = MetadataVersion.MINIMUM_KRAFT_VERSION Review Comment: I would prefer to do this in a follow-up, since it involves changing a lot more code. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org