> On April 25, 2015, 4:18 p.m., Aditya Auradkar wrote: > > core/src/main/scala/kafka/server/AbstractFetcherThread.scala, line 95 > > <https://reviews.apache.org/r/33551/diff/1/?file=941643#file941643line95> > > > > The way this function is implemented, it potentially acquires the same > > lock twice when it's not really necessary. > > > > Can you simply merge this check into the synchronized block above? It's > > a fairly cheap check I guess. The fetch request can still be performed > > outside the locked segment.
The reason I did that is to avoid processFetchRequest in the partitionMapLock. - Sriharsha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33551/#review81593 ----------------------------------------------------------- On April 25, 2015, 2:48 p.m., Sriharsha Chintalapani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33551/ > ----------------------------------------------------------- > > (Updated April 25, 2015, 2:48 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-2150 > https://issues.apache.org/jira/browse/KAFKA-2150 > > > Repository: kafka > > > Description > ------- > > KAFKA-2150. FetcherThread backoff need to grab lock before wait on condition. > > > Diffs > ----- > > core/src/main/scala/kafka/server/AbstractFetcherThread.scala > a439046e118b6efcc3a5a9d9e8acb79f85e40398 > > Diff: https://reviews.apache.org/r/33551/diff/ > > > Testing > ------- > > > Thanks, > > Sriharsha Chintalapani > >