Lucas Bradstreet created KAFKA-8125:
---------------------------------------

             Summary: 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


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
(v7.6.3#76005)

Reply via email to