[
https://issues.apache.org/jira/browse/KAFKA-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14606862#comment-14606862
]
Guozhang Wang commented on KAFKA-2129:
--------------------------------------
[~timbrooks], sorry for the long-late reply to this ticket.. I agree this is a
big problem, and someone has attempted to solve it in a large re-factoring way
(KAFKA-2168). Could you take a look at that patch and see if it solved your
problem or there are some other corner cases?
> Consumer could make multiple concurrent metadata requests
> ---------------------------------------------------------
>
> Key: KAFKA-2129
> URL: https://issues.apache.org/jira/browse/KAFKA-2129
> Project: Kafka
> Issue Type: Bug
> Components: clients
> Reporter: Tim Brooks
> Assignee: Tim Brooks
> Attachments: KAFKA-2129.patch
>
>
> The NetworkClient's metadataFetchInProgress is neither volatile nor atomic.
> This protects against multiple metadata requests being made and is read on
> poll() on the NetworkClient. It is written to when a request is initiated.
> This is fine for the producer. Which seems to have one thread writing. The
> KafkaConsumer's poll() method is synchronized, so there will not be more
> than one writer entering from there. However, the NetworkClient's poll()
> method is also accessed on the Consumer's partitionsFor() method. Which could
> be access by a separate thread.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)