> On May 27, 2014, 9:10 p.m., Neha Narkhede wrote: > > core/src/main/scala/kafka/utils/ZkUtils.scala, line 390 > > <https://reviews.apache.org/r/21899/diff/1/?file=594246#file594246line390> > > > > This is a generic API for conditional updates. Logic specific to Kafka > > shouldn't go here. Let's move it to a utils class. We have utils for Zk, > > API, clients but not for replication. Let's create a ReplicationUtils and > > add a common updateIsr utility. Controller and server can use that. Let's > > file a JIRA to refactor some existing utils related to replication to go to > > ReplicationUtils > > Sriharsha Chintalapani wrote: > I am working on adding ReplicationUtils class but for > ZkUtils.conditionalUpdatePersistenPath doesn't throw any exception it only > returns false,-1 incase of failures. Ideally I would like to check if the > current data in zk is same as the new data that we are trying to update only > when there is zkbadversionexception happens . What you think is the best way > todo that without modifying the ZkUtils methods. I can ofcourse check for > this whenever there is false returned from conditionalupdate but that doesn't > seems to be efficient.
We can include the logic of ignoring the update on a ZkBadVersionException inside conditionalUpdatePersistentPath itself since it makes sense for all uses cases of that API. - Neha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21899/#review44043 ----------------------------------------------------------- On May 26, 2014, 5:08 a.m., Sriharsha Chintalapani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21899/ > ----------------------------------------------------------- > > (Updated May 26, 2014, 5:08 a.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. > > > Diffs > ----- > > core/src/main/scala/kafka/utils/ZkUtils.scala > fcbe269b6057b45793ea95f357890d5d6922e8d4 > > Diff: https://reviews.apache.org/r/21899/diff/ > > > Testing > ------- > > > Thanks, > > Sriharsha Chintalapani > >