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

ASF GitHub Bot commented on KAFKA-4443:
---------------------------------------

GitHub user lindong28 opened a pull request:

    https://github.com/apache/kafka/pull/2168

    KAFKA-4443; Controller should send UpdateMetadataRequest prior to 
LeaderAndIsrRequest during failover

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lindong28/kafka KAFKA-4443

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2168.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2168
    
----
commit 4db70c9e9960c688932dda8d942ee2fedc459e1e
Author: Dong Lin <lindon...@gmail.com>
Date:   2016-11-25T04:21:50Z

    KAFKA-4443; Controller should send UpdateMetadataRequest prior to 
LeaderAndIsrRequest during failover

----


> Controller should send UpdateMetadataRequest prior to LeaderAndIsrRequest 
> during failover
> -----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-4443
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4443
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Dong Lin
>            Assignee: Dong Lin
>
> Currently in onControllerFailover(), controller will startup 
> replicaStatemachine and partitionStateMachine before invoking 
> sendUpdateMetadataRequest(controllerContext.liveOrShuttingDownBrokerIds.toSeq).
>  However, if a broker right after controller election, the 
> LeaderAndIsrRequest sent to follower partitions on this broker will all be 
> ignored because broker doesn't know the leaders are alive. 
> To fix this problem, in onControllerFailover(), controller should send 
> UpdateMetadataRequest to brokers after initializeControllerContext() but 
> before it starts replicaStatemachine and partitionStateMachine. The first 
> MetadatUpdateRequest will include list of live broker. Although it will not 
> include partition leader information, it is OK because we will always send 
> MetadataUpdateRequest again when we send LeaderAndIsrRequest during 
> replicaStateMachine.startup() and partitionStateMachine.startup().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to