----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36030/#review89907 -----------------------------------------------------------
Thanks for the patch. A few comments below. 1. Could you add a unit test for this? 2. Also, we may have a similar issue when handling the failure of the broker. Currently, the logic in the controller is that the controller will only send an UpdateMetadataRequest to all brokers if a new leader is elected. So, when shutting down a broker with no leaders on it, the controller won't send UpdateMetadataRequest to reflect the shutdown broker. Could you verify if this is indeed an issue? core/src/main/scala/kafka/controller/KafkaController.scala (lines 399 - 401) <https://reviews.apache.org/r/36030/#comment142784> Could you change the comments accordingly? core/src/main/scala/kafka/controller/KafkaController.scala (line 402) <https://reviews.apache.org/r/36030/#comment142783> We probably should use liveOrShuttingDownBrokerIds. - Jun Rao On June 30, 2015, 12:46 a.m., Ashish Singh wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36030/ > ----------------------------------------------------------- > > (Updated June 30, 2015, 12:46 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-972 > https://issues.apache.org/jira/browse/KAFKA-972 > > > Repository: kafka > > > Description > ------- > > KAFKA-972: MetadataRequest returns stale list of brokers > > > Diffs > ----- > > core/src/main/scala/kafka/controller/KafkaController.scala > 36350579b16027359d237b64699003358704ac6f > > Diff: https://reviews.apache.org/r/36030/diff/ > > > Testing > ------- > > > Thanks, > > Ashish Singh > >