This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 344798f KAFKA-13151; Disallow policy configs in KRaft since they are
not yet supported (#11145)
344798f is described below
commit 344798fc21317f72241a22fefd9250211fa36fba
Author: Ryan Dielhenn <[email protected]>
AuthorDate: Fri Jul 30 12:46:25 2021 -0700
KAFKA-13151; Disallow policy configs in KRaft since they are not yet
supported (#11145)
The configs `alter.config.policy.class.name` and
`create.topic.policy.class.name` are not yet supported by KRaft. KRaft servers
should fail startup if any of these are configured.
Reviewers: Luke Chen <[email protected]>, David Arthur <[email protected]>,
Jason Gustafson <[email protected]>
---
core/src/main/scala/kafka/server/KafkaConfig.scala | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/src/main/scala/kafka/server/KafkaConfig.scala
b/core/src/main/scala/kafka/server/KafkaConfig.scala
index b715fca..703d796 100755
--- a/core/src/main/scala/kafka/server/KafkaConfig.scala
+++ b/core/src/main/scala/kafka/server/KafkaConfig.scala
@@ -2008,5 +2008,10 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog:
Boolean, dynamicConfigO
require(principalBuilderClass != null,
s"${KafkaConfig.PrincipalBuilderClassProp} must be non-null")
require(classOf[KafkaPrincipalSerde].isAssignableFrom(principalBuilderClass),
s"${KafkaConfig.PrincipalBuilderClassProp} must implement
KafkaPrincipalSerde")
+
+ if (usesSelfManagedQuorum) {
+ require(getClass(KafkaConfig.AlterConfigPolicyClassNameProp) == null,
s"${KafkaConfig.AlterConfigPolicyClassNameProp} is not supported in KRaft.")
+ require(getClass(KafkaConfig.CreateTopicPolicyClassNameProp) == null,
s"${KafkaConfig.CreateTopicPolicyClassNameProp} is not supported in KRaft.")
+ }
}
}