> On June 19, 2014, 4:29 a.m., Neha Narkhede wrote:
> > core/src/main/scala/kafka/controller/KafkaController.scala, line 172
> > <https://reviews.apache.org/r/22496/diff/1/?file=608034#file608034line172>
> >
> >     I think this should be removed as well. Basically, the only time the 
> > broker needs to refresh information about the controller epoch is when it 
> > gets elected as the controller. Also, it needs to reset it to 0 or 
> > something once onControllerResignation().
> 
> Sriharsha Chintalapani wrote:
>     controllerContext.epoch is being used in moveReassignedPartitionLeader 
> and onPartitionReassignment, onControllerFailover. controllerContext.epoch 
> can be used when reassign partitions is called.

Yes, it is used in a number of places in the controller. But the problem is 
that the only time the controller should read it's epoch and store it locally 
inside controllerEpoch.epoch is when it becomes the controller. It will then 
use that epoch in a number of state changes including reassigning partitions. 
Similarly, it should reset the epoch to some low number (0) when it loses it's 
controller status. 


- Neha


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22496/#review46184
-----------------------------------------------------------


On June 12, 2014, 4:52 a.m., Sriharsha Chintalapani wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22496/
> -----------------------------------------------------------
> 
> (Updated June 12, 2014, 4:52 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1096
>     https://issues.apache.org/jira/browse/KAFKA-1096
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1096. An old controller coming out of long GC could update its epoch to 
> the latest controller's epoch.
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/controller/KafkaController.scala 
> 8af48ab500779d3d851d25050e1308f5e7b588a6 
> 
> Diff: https://reviews.apache.org/r/22496/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sriharsha Chintalapani
> 
>

Reply via email to