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

Jun Rao commented on KAFKA-474:
-------------------------------

Yes, fetcherSourceBroker is actually no longer needed. It was used before when 
a follower switches leaders. The follower uses that method to see if it's 
already fetching from the new leader. We removed this when we cache the leader 
epoch in Partition, which avoids executing duplicated leader change requests.

The real problem here is that in addFetcher(), we use the broker id as the key. 
Of course, the host/port info could have changed. I think a simple solution may 
be just key fetcherThreadMap on Broker, instead of broker id.
                
> support changing host/port of a broker
> --------------------------------------
>
>                 Key: KAFKA-474
>                 URL: https://issues.apache.org/jira/browse/KAFKA-474
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>            Reporter: Jun Rao
>              Labels: bugs, newbie
>             Fix For: 0.8
>
>
> Currently, the consumer client caches the host/port of a broker and never 
> refreshes the cache. This means that if a broker changes to a different host, 
> the consumer client won't be able to connect to the new host without a 
> restart. One possibility is to change AbstractFetcherManager to maintain a 
> map of <Broker, fetcher>, instead of <broker id, fetcher>.

--
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

Reply via email to