Skip to content

Commit

Permalink
[aiven] fix ZK topic creation
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppelillo committed Jan 26, 2024
1 parent 21f943a commit 1036d97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/main/scala/kafka/server/ZkAdminManager.scala
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ class ZkAdminManager(val config: KafkaConfig,
try {
if (metadataCache.contains(topic.name))
throw new TopicExistsException(s"Topic '${topic.name}' already exists.")
val maybeUuid = Option(topic.id())
maybeUuid match {
case Some(id) =>
val maybeUuid = topic.id() match {
case Uuid.ZERO_UUID => None
case id =>
if (metadataCache.topicNamesToIds().containsValue(id)) {
throw new TopicExistsException(s"Topic id '$id' already exists.")
}
case _ =>
Some(id)
}

val nullConfigs = topic.configs.asScala.filter(_.value == null).map(_.name)
Expand Down

0 comments on commit 1036d97

Please sign in to comment.