> On Jan. 14, 2014, 2:41 a.m., Joel Koshy wrote: > > core/src/main/scala/kafka/controller/PartitionLeaderSelector.scala, line 173 > > <https://reviews.apache.org/r/16814/diff/1/?file=421237#file421237line173> > > > > We discussed this offline, but may be good to document the motivation > > for this change.
I thought the original implementation probably needs more explanation. The new code seems more self explainable. - Jun ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/16814/#review31693 ----------------------------------------------------------- On Jan. 13, 2014, 5:57 a.m., Jun Rao wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/16814/ > ----------------------------------------------------------- > > (Updated Jan. 13, 2014, 5:57 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1202 > https://issues.apache.org/jira/browse/KAFKA-1202 > > > Repository: kafka > > > Description > ------- > > 1. Changed ununcessary ZK reads to reading from the controller cache. 2. > ReassignedPartitionLeaderSelector: Make sure the new leader is in the current > isr. 3. ControlledShutdownLeaderSelector: Only make sure that the new leader > is not being shutting down. This means that if the leader is already moved > off the shutting down broker, we will let leader election succeed (even > though it's not necessary). This increases the chance of a successful > controlled shutdown. 4. Added various comments. > > > Diffs > ----- > > core/src/main/scala/kafka/controller/KafkaController.scala > 03ef9cf00602cfb6c6485c5a818a2f54a9e499b7 > core/src/main/scala/kafka/controller/PartitionLeaderSelector.scala > a47b142940fd8aaebbecebf67eb6d74a4dc871de > core/src/main/scala/kafka/controller/PartitionStateMachine.scala > 5859ce7abaf0b675693a025f867ae9cef59f3bf7 > core/src/main/scala/kafka/controller/ReplicaStateMachine.scala > ad4ee53a9516e7e6ea14a9ec72a5aab511810f83 > core/src/main/scala/kafka/utils/ZkUtils.scala > 73902b2bd18b95e00e610fca86d6ed8b4af30e9a > > Diff: https://reviews.apache.org/r/16814/diff/ > > > Testing > ------- > > > Thanks, > > Jun Rao > >