[
https://issues.apache.org/jira/browse/KAFKA-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Swapnil Ghike updated KAFKA-1017:
---------------------------------
Attachment: kafka-1017.patch
This patch fixes two issues:
1. Reduce the number of open file handles on the producer: I think we can clear
the topic-partition send-cache on the EventHandler once in every refresh
metadata interval. This will make the producer produce to the same partition
for say, 15 mins, for a given topic. That should be ok. The topic-partition
send-cache will be refreshed when the metadata is refreshed.
2. There is a race condition in Producer.send() and Producer.close(). This can
lead to reopening of a closed ProducerPool and thereby socket leaks.
> High number of open file handles in 0.8 producer
> ------------------------------------------------
>
> Key: KAFKA-1017
> URL: https://issues.apache.org/jira/browse/KAFKA-1017
> Project: Kafka
> Issue Type: Bug
> Reporter: Swapnil Ghike
> Assignee: Swapnil Ghike
> Attachments: kafka-1017.patch
>
>
> Reported by Jun Rao:
> For over-partitioned topics, each broker could be the leader for at least 1
> partition. In the producer, we randomly select a partition to send the data.
> Pretty soon, each producer will establish a connection to each of the n
> brokers. Effectively, we increased the # of socket connections by a factor of
> n, compared to 0.7.
> The increased number of socket connections increases the number of open file
> handles, this could come pretty close to the OS limit.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira