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

Tim Brooks commented on KAFKA-2129:
-----------------------------------

Created reviewboard https://reviews.apache.org/r/33634/diff/
 against branch origin/trunk

> 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
>            Priority: Minor
>         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)

Reply via email to