----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25155/#review52036 -----------------------------------------------------------
core/src/main/scala/kafka/server/RequestPurgatory.scala <https://reviews.apache.org/r/25155/#comment90763> It's probably better to expose an api that returns the size of the queue, instead of exposing the queue itself. core/src/main/scala/kafka/server/RequestPurgatory.scala <https://reviews.apache.org/r/25155/#comment90764> It probably would be clearer if we use RequestPurgatory.this.size(). core/src/main/scala/kafka/server/RequestPurgatory.scala <https://reviews.apache.org/r/25155/#comment90767> I thought that we only want to call purgeSatisfied if delayed.size >= purgeIntveral and similarly, only call watcherForKey...purgeSatisfied() if RequestPurgatory.this.size() >= purgeInterval? core/src/test/scala/unit/kafka/server/RequestPurgatoryTest.scala <https://reviews.apache.org/r/25155/#comment90761> one of the request => one of the requests core/src/test/scala/unit/kafka/server/RequestPurgatoryTest.scala <https://reviews.apache.org/r/25155/#comment90762> Instead of using sleep, would it be better to wrap the test using waitUntilTrue()? - Jun Rao On Sept. 1, 2014, 9:41 p.m., Guozhang Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25155/ > ----------------------------------------------------------- > > (Updated Sept. 1, 2014, 9:41 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1616 > https://issues.apache.org/jira/browse/KAFKA-1616 > > > Repository: kafka > > > Description > ------- > > Purgatory size to be the sum of watched list sizes; delayed request to be the > expiry queue length; remove atomic integers for metrics; add a unit test for > watched list sizes and enqueued requests > > > Diffs > ----- > > core/src/main/scala/kafka/server/RequestPurgatory.scala > ce06d2c381348deef8559374869fcaed923da1d1 > core/src/test/scala/unit/kafka/server/RequestPurgatoryTest.scala > 168712de241125982d556c188c76514fceb93779 > > Diff: https://reviews.apache.org/r/25155/diff/ > > > Testing > ------- > > > Thanks, > > Guozhang Wang > >