chia7712 commented on code in PR #18566:
URL: https://github.com/apache/kafka/pull/18566#discussion_r1943391162
##########
core/src/main/scala/kafka/server/KafkaRaftServer.scala:
##########
@@ -182,8 +182,7 @@ object KafkaRaftServer {
}
// Load the BootstrapMetadata.
- val bootstrapDirectory = new BootstrapDirectory(config.metadataLogDir,
- Optional.ofNullable(config.interBrokerProtocolVersionString))
+ val bootstrapDirectory = new BootstrapDirectory(config.metadataLogDir,
Optional.empty())
Review Comment:
open https://issues.apache.org/jira/browse/KAFKA-18740 to cleanup
`BootstrapDirectory` as follow-up
##########
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 have reopened https://issues.apache.org/jira/browse/KAFKA-18366
##########
server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java:
##########
@@ -127,13 +125,6 @@ public class ReplicationConfigs {
"thread to trigger election periodically (default is 5 minutes).
Please run `kafka-leader-election.sh` with `unclean` option " +
"to trigger the unclean leader election immediately if
needed.</p>";
- public static final String INTER_BROKER_PROTOCOL_VERSION_CONFIG =
"inter.broker.protocol.version";
Review Comment:
open https://issues.apache.org/jira/browse/KAFKA-18741 to document it
--
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]