This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 4f840afcb0 [ISSUE #6960] Added Slot formatting sketch comments (#6961)
4f840afcb0 is described below
commit 4f840afcb04f5cc328795896198c6fba96ff37ec
Author: mxsm <[email protected]>
AuthorDate: Wed Jul 5 11:03:52 2023 +0800
[ISSUE #6960] Added Slot formatting sketch comments (#6961)
---
store/src/main/java/org/apache/rocketmq/store/timer/Slot.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/store/src/main/java/org/apache/rocketmq/store/timer/Slot.java
b/store/src/main/java/org/apache/rocketmq/store/timer/Slot.java
index b91193b94a..2da846ceed 100644
--- a/store/src/main/java/org/apache/rocketmq/store/timer/Slot.java
+++ b/store/src/main/java/org/apache/rocketmq/store/timer/Slot.java
@@ -16,9 +16,17 @@
*/
package org.apache.rocketmq.store.timer;
+/**
+ * Represents a slot of timing wheel. Format:
+ * ┌────────────┬───────────┬───────────┬───────────┬───────────┐
+ * │delayed time│ first pos │ last pos │ num │ magic │
+ * ├────────────┼───────────┼───────────┼───────────┼───────────┤
+ * │ 8bytes │ 8bytes │ 8bytes │ 4bytes │ 4bytes │
+ * └────────────┴───────────┴───────────┴───────────┴───────────┘
+ */
public class Slot {
public static final short SIZE = 32;
- public final long timeMs;
+ public final long timeMs; //delayed time
public final long firstPos;
public final long lastPos;
public final int num;