[ https://issues.apache.org/jira/browse/KAFKA-1507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14077182#comment-14077182 ]
Jay Kreps commented on KAFKA-1507: ---------------------------------- I kind of feel this is not the right fix. I think the behavior we have is kind of indefensible. The history was that we previously had an auto-create topic that happened when a message was sent to a broker and that broker didn't host the topic. However when we moved to replication this broke for multiple reasons: the producer needed metadata about the topic to send the message, and not all brokers would have all partitions. However this "auto-create" behavior is very useful. So we kind of just grandfathered it in by having the metadata request have the same side effect. But this is really a silly indefensible behavior. There is no reason that asking for metadata should create topics! This would be like in a database if running DESCRIBE TABLE X would create table X for you if it didn't exist. This just confuses everyone, as it must have confused you. In any case the auto-creation behavior is very limited because there is no way to specify the number of partitions, the replication factor, or any topic-specific configuration. Rather than further enshrining this behavior behavior by starting to add topic creation options to the metadata request, I really think we should add a proper create_topic API and have producers use that. We could even make this a little more general and handle create, alter, and delete. This would give clients full control. > Using GetOffsetShell against non-existent topic creates the topic > unintentionally > --------------------------------------------------------------------------------- > > Key: KAFKA-1507 > URL: https://issues.apache.org/jira/browse/KAFKA-1507 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8.1.1 > Environment: centos > Reporter: Luke Forehand > Assignee: Sriharsha Chintalapani > Priority: Minor > Labels: newbie > Attachments: KAFKA-1507.patch, KAFKA-1507_2014-07-22_10:27:45.patch, > KAFKA-1507_2014-07-23_17:07:20.patch > > > A typo in using GetOffsetShell command can cause a > topic to be created which cannot be deleted (because deletion is still in > progress) > ./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list > kafka10:9092,kafka11:9092,kafka12:9092,kafka13:9092 --topic typo --time 1 > ./kafka-topics.sh --zookeeper stormqa1/kafka-prod --describe --topic typo > Topic:typo PartitionCount:8 ReplicationFactor:1 Configs: > Topic: typo Partition: 0 Leader: 10 Replicas: 10 > Isr: 10 > ... -- This message was sent by Atlassian JIRA (v6.2#6252)