> On July 23, 2014, 4:56 p.m., Jay Kreps wrote:
> > Is this better than using a condition? I was imagining replacing sleep with 
> > shutdownCondition.await(backoffMs, TimeUnit.MILLISECONDS) and then in 
> > shutdown() we call shutdownCondition.signal().

Actually a condition isn't quite right as there is a subtle race between signal 
and await. Better would be the same approach but using 
CountDownLatch.await(backoff, TimeUnit.MS)


- Jay


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


On July 23, 2014, 4:44 p.m., Manikumar Reddy O wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23858/
> -----------------------------------------------------------
> 
> (Updated July 23, 2014, 4:44 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1544
>     https://issues.apache.org/jira/browse/KAFKA-1544
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> Implemented Jun's solution to decrease LogCleaner shutdown time during 
> shutdown
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/log/LogCleaner.scala 
> 2faa196a4dc612bc634d5ff5f5f275d09073f13b 
> 
> Diff: https://reviews.apache.org/r/23858/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Manikumar Reddy O
> 
>

Reply via email to