Takafumi Saito created KAFKA-5789: ------------------------------------- Summary: Deleted topic is recreated when consumer subscribe the deleted one Key: KAFKA-5789 URL: https://issues.apache.org/jira/browse/KAFKA-5789 Project: Kafka Issue Type: Bug Components: clients Affects Versions: 0.11.0.0 Reporter: Takafumi Saito
When setting auto.create.topic.enbale true in broker, some deleted topics will be re-created. Because when consumer that subscribe deleted topic is exist, broker will create topic having same name. It is not necessary that consumers trigger new topic creation , so auto topic creation in consumer should be disabled. I attatch the log outputted in our broker. This show that a topic (topic_1) was deleted at 12:02:24,672, but same topic was created shortly thereafter: {code:java} [2017-08-22 12:02:24,666] INFO [ReplicaFetcherManager on broker 1] Removed fetcher for partitions topic_1-0 (kafka.server.ReplicaFetcherManager) [2017-08-22 12:02:24,666] INFO [ReplicaFetcherManager on broker 1] Removed fetcher for partitions (kafka.server.ReplicaFetcherManager) [2017-08-22 12:02:24,667] INFO [ReplicaFetcherManager on broker 1] Removed fetcher for partitions topic_1-0 (kafka.server.ReplicaFetcherManager) [2017-08-22 12:02:24,672] INFO Log for partition topic_1-0 is renamed to /data/topic_1-0.ad490e8326704ae6a6fd9f6399c29614-delete and is scheduled for deletion (kafka.log.LogManager) [2017-08-22 12:02:24,736] INFO Loading producer state from offset 0 for partition topic_1-0 with message format version 2 (kafka.log.Log) [2017-08-22 12:02:24,736] INFO Completed load of log topic_1-0 with 1 log segments, log start offset 0 and log end offset 0 in 1 ms (kafka.log.Log) [2017-08-22 12:02:24,737] INFO Created log for partition [topic_1,0] in /data with properties {compression.type -> producer, message.format.version -> 0.11.0-IV2, file.delete.delay.ms -> 60000, max.message.bytes -> 1000012, min.compaction.lag.ms -> 0, message.timestamp.type -> CreateTime, min.insync.replicas -> 1, segment.jitter.ms -> 0, preallocate -> false, min.cleanable.dirty.ratio -> 0.5, i ndex.interval.bytes -> 4096, unclean.leader.election.enable -> false, retention.bytes -> -1, delete.retention.ms -> 86400000, cleanup.policy -> [delete], flush.ms -> 9223372036854775807, segment.ms -> 60 4800000, segment.bytes -> 1073741824, retention.ms -> 86400000, message.timestamp.difference.max.ms -> 9223372036854775807, segment.index.bytes -> 10485760, flush.messages -> 9223372036854775807}. (kafka .log.LogManager) [2017-08-22 12:02:24,738] INFO [ReplicaFetcherManager on broker 1] Removed fetcher for partitions topic_1-0 (kafka.server.ReplicaFetcherManager) [2017-08-22 12:02:24,738] INFO [ReplicaFetcherManager on broker 1] Added fetcher for partitions List([topic_1-0, initOffset 0 to broker BrokerEndPoint(2,sbx-patriot-kafka02.amb-patriot.incvb.io, 9092)] ) (kafka.server.ReplicaFetcherManager) [2017-08-22 12:02:25,200] INFO [ReplicaFetcherThread-0-2]: Based on follower's leader epoch, leader replied with an offset 0 >= the follower's log end offset 0 in topic_1-0. No truncation needed . (kafka.server.ReplicaFetcherThread) [2017-08-22 12:02:25,200] INFO Truncating topic_1-0 to 0 has no effect as the largest offset in the log is -1. (kafka.log.Log) {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)