You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Lucia Cerchie (Jira)" <ji...@apache.org> on 2022/11/08 15:49:00 UTC

[jira] [Assigned] (KAFKA-14358) Users should not be able to create a regular topic name __cluster_metadata

     [ https://issues.apache.org/jira/browse/KAFKA-14358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lucia Cerchie reassigned KAFKA-14358:
-------------------------------------

    Assignee: Lucia Cerchie  (was: José Armando García Sancio)

> Users should not be able to create a regular topic name __cluster_metadata
> --------------------------------------------------------------------------
>
>                 Key: KAFKA-14358
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14358
>             Project: Kafka
>          Issue Type: Bug
>          Components: controller
>            Reporter: José Armando García Sancio
>            Assignee: Lucia Cerchie
>            Priority: Blocker
>             Fix For: 3.4.0, 3.3.2
>
>
> The following test passes and it should not:
> {code:java}
>  $ git diff                           
> diff --git a/core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala b/core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala
> index 57834234cc..14b1435d00 100644
> --- a/core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala
> +++ b/core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala
> @@ -102,6 +102,12 @@ class CreateTopicsRequestTest extends AbstractCreateTopicsRequestTest {
>      validateTopicExists("partial-none")
>    }
>   
> +  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
> +  @ValueSource(strings = Array("zk", "kraft"))
> +  def testClusterMetadataTopicFails(quorum: String): Unit = {
> +    createTopic("__cluster_metadata", 1, 1)
> +  }
> +
>    @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
>    @ValueSource(strings = Array("zk"))
>    def testCreateTopicsWithVeryShortTimeouts(quorum: String): Unit = {{code}
> Result of this test:
> {code:java}
>  $ ./gradlew core:test --tests CreateTopicsRequestTest.testClusterMetadataTopicFails
> > Configure project :
> Starting build with version 3.4.0-SNAPSHOT (commit id bc780c7c) using Gradle 7.5.1, Java 1.8 and Scala 2.13.8
> Build properties: maxParallelForks=12, maxScalacThreads=8, maxTestRetries=0
> > Task :core:test
> Gradle Test Run :core:test > Gradle Test Executor 8 > CreateTopicsRequestTest > testClusterMetadataTopicFails(String) > kafka.server.CreateTopicsRequestTest.testClusterMetadataTopicFails(String)[1] PASSED
> Gradle Test Run :core:test > Gradle Test Executor 8 > CreateTopicsRequestTest > testClusterMetadataTopicFails(String) > kafka.server.CreateTopicsRequestTest.testClusterMetadataTopicFails(String)[2] PASSED
> BUILD SUCCESSFUL in 44s
> 44 actionable tasks: 3 executed, 41 up-to-date
> {code}
> I think that this test should fail in both KRaft and ZK. We want this to fail in ZK so that it can be migrated to KRaft.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)