You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2021/11/15 19:06:26 UTC
[kafka] branch trunk updated: MINOR: fix comment in TimingWheel (#11480)
This is an automated email from the ASF dual-hosted git repository.
junrao pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new a3ab7d5 MINOR: fix comment in TimingWheel (#11480)
a3ab7d5 is described below
commit a3ab7d5b42d02f194a8bdf3047c374f938ca0dad
Author: jiangyuan <46...@qq.com>
AuthorDate: Tue Nov 16 03:04:53 2021 +0800
MINOR: fix comment in TimingWheel (#11480)
Co-authored-by: jiangyuan04 <ji...@baidu.com>
Reviewers: Luke Chen <sh...@gmail.com>, Jun Rao <ju...@gmail.com>
---
core/src/main/scala/kafka/utils/timer/TimingWheel.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/src/main/scala/kafka/utils/timer/TimingWheel.scala b/core/src/main/scala/kafka/utils/timer/TimingWheel.scala
index 4535f3f..648e6d6 100644
--- a/core/src/main/scala/kafka/utils/timer/TimingWheel.scala
+++ b/core/src/main/scala/kafka/utils/timer/TimingWheel.scala
@@ -78,7 +78,7 @@ import java.util.concurrent.atomic.AtomicInteger
*
* 1 [c+2,c+2] [c+3,c+3] [c+4,c+4]
* 2 [c,c+2] [c+3,c+5] [c+6,c+8]
- * 3 [c,c+8] [c+9,c+17] [c+18,c+18]
+ * 3 [c,c+8] [c+9,c+17] [c+18,c+26]
*
* At time = c+3, [c+2,c+2] is newly expired.
* Level 2 moves to c+3, and [c+5,c+5] and [c+9,c+11] are created.
@@ -86,7 +86,7 @@ import java.util.concurrent.atomic.AtomicInteger
*
* 1 [c+3,c+3] [c+4,c+4] [c+5,c+5]
* 2 [c+3,c+5] [c+6,c+8] [c+9,c+11]
- * 3 [c,c+8] [c+9,c+17] [c+8,c+11]
+ * 3 [c,c+8] [c+9,c+17] [c+18,c+26]
*
* The hierarchical timing wheels works especially well when operations are completed before they time out.
* Even when everything times out, it still has advantageous when there are many items in the timer.