You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Dhruvil Shah (Jira)" <ji...@apache.org> on 2019/10/16 01:15:00 UTC

[jira] [Resolved] (KAFKA-8125) Check for topic existence in CreateTopicsRequest prior to creating replica assignment

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

Dhruvil Shah resolved KAFKA-8125.
---------------------------------
    Resolution: Duplicate

> Check for topic existence in CreateTopicsRequest prior to creating replica assignment
> -------------------------------------------------------------------------------------
>
>                 Key: KAFKA-8125
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8125
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 2.1.1
>            Reporter: Lucas Bradstreet
>            Assignee: huxihx
>            Priority: Minor
>
> Imagine the following pattern to ensure topic creation in an application:
>  # Attempt to create a topic with # partitions P and replication factor R.
>  #  If topic creation fails with TopicExistsException, continue. If topic creation succeeds, continue, the topic now exists.
> This normally works fine. However, if the topic has already been created, but if the number of live brokers < R, then the topic creation will fail an org.apache.kafka.common.errors.InvalidReplicationFactorException, even though the topic already exists.
> This could be avoided if we check whether the topic exists prior to calling AdminUtils.assignReplicasToBrokers.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)