> On June 2, 2014, 9:01 p.m., Neha Narkhede wrote:
> > core/src/main/scala/kafka/utils/ReplicationUtils.scala, line 46
> > <https://reviews.apache.org/r/21899/diff/3/?file=601101#file601101line46>
> >
> >     Updating the zookeeper path if the contents are equal even if the 
> > version does not match seems to be widely applicable. So it should be 
> > generic API, not just limited to leader, isr or for that matter, any 
> > replication specific logic. How about making it a generic utility in 
> > ZkUtils that takes in a data comparator that the user implements and 
> > returns true with the new version only if the data matches? In fact, maybe 
> > even conditionalUpdatePersistentPath could be changed to accept a 
> > comparator. If the comparator is not passed in, it skips the check

I made checkLeaderAndIsrZkData as an Optional checker method argument for 
conditionalUpdatePersistentPath. Please let me know if the checker method 
should be simpler that should accept newleader and zkdata strings compare and 
return true and rest of the logic should be in conditionalUpdatePersistentPath.


- Sriharsha


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


On June 4, 2014, 7:30 p.m., Sriharsha Chintalapani wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21899/
> -----------------------------------------------------------
> 
> (Updated June 4, 2014, 7:30 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1382
>     https://issues.apache.org/jira/browse/KAFKA-1382
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1382. Update zkVersion on partition state update failures.
> 
> 
> KAFKA-1382. Update zkVersion on partition state update failures.
> 
> 
> KAFKA-1382. Update zkVersion on partition state update failures.
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/cluster/Partition.scala 
> 518d2df5ae702d8c0937e1f9603fd11a54e24be8 
>   core/src/main/scala/kafka/controller/KafkaController.scala 
> e776423b8a38da6f08b2262c8141abf2064d37d2 
>   core/src/main/scala/kafka/controller/PartitionStateMachine.scala 
> 6457b56340a1b5440b07612f69dcffe4b051f919 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala PRE-CREATION 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 
> fcbe269b6057b45793ea95f357890d5d6922e8d4 
> 
> Diff: https://reviews.apache.org/r/21899/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sriharsha Chintalapani
> 
>

Reply via email to