Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka, mail # dev - [jira] [Commented] (KAFKA-1071) The random partition selected in DefaultEventHandler is not random across producer instances


Copy link to this message
-
[jira] [Commented] (KAFKA-1071) The random partition selected in DefaultEventHandler is not random across producer instances
"Jun Rao 2013-10-03, 04:32

    [ https://issues.apache.org/jira/browse/KAFKA-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784816#comment-13784816 ]

Jun Rao commented on KAFKA-1071:
--------------------------------

Thanks for the patch. Would it be better to just get a random int in getPartition()? In the current approach, if the multiple producer instances somehow get into the lock-step mode, they will never get out of that mode, if partitions are always available.

> The random partition selected in DefaultEventHandler is not random across producer instances
> --------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-1071
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1071
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Guozhang Wang
>             Fix For: 0.8
>
>         Attachments: KAFKA-1071.v1.patch
>
>
> In DefaultEventHandler, partitionCounter is initialized to 0. If multiple producers start at about the same time, they likely will always select the same partition.

--
This message was sent by Atlassian JIRA
(v6.1#6144)

 
+
Neha Narkhede 2013-10-03, 23:04
+
Guozhang Wang 2013-10-03, 22:14