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


Thanks for the new patch. A few more clarification questions below.


core/src/main/scala/kafka/utils/timer/TimerTaskList.scala
<https://reviews.apache.org/r/34734/#comment137341>

    Could you explain a bit how the extra sync helps?



core/src/main/scala/kafka/utils/timer/TimerTaskList.scala
<https://reviews.apache.org/r/34734/#comment137349>

    Since this is under synchronized, it seems that remove should always return 
true?



core/src/main/scala/kafka/utils/timer/TimerTaskList.scala
<https://reviews.apache.org/r/34734/#comment137347>

    With this canceled flag, the logic is a bit more complicated since a few 
other places need to check this flag. Not sure how much this helps in reducing 
the probability of having a cancelled operation reinserted into the list. Do 
you think it's worth doing this?



core/src/main/scala/kafka/utils/timer/TimerTaskList.scala
<https://reviews.apache.org/r/34734/#comment137345>

    Not sure if I follow this comment.


- Jun Rao


On May 29, 2015, 12:19 a.m., Yasuhiro Matsuda wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34734/
> -----------------------------------------------------------
> 
> (Updated May 29, 2015, 12:19 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2226
>     https://issues.apache.org/jira/browse/KAFKA-2226
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> fix a race condition in TimerTaskEntry.remove
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/utils/timer/Timer.scala 
> b8cde820a770a4e894804f1c268b24b529940650 
>   core/src/main/scala/kafka/utils/timer/TimerTask.scala 
> 3407138115d579339ffb6b00e32e38c984ac5d6e 
>   core/src/main/scala/kafka/utils/timer/TimerTaskList.scala 
> e7a96570ddc2367583d6d5590628db7e7f6ba39b 
>   core/src/main/scala/kafka/utils/timer/TimingWheel.scala 
> e92aba3844dbf3372182e14536a5d98cf3366d73 
> 
> Diff: https://reviews.apache.org/r/34734/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Yasuhiro Matsuda
> 
>

Reply via email to