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 66cf564c6 [ISSUE #6523] Schematic diagram of adding BatchConsumeQueue 
storage unit (#6524)
66cf564c6 is described below

commit 66cf564c67a722dbb6de7c7525db19f5d8d8fca8
Author: mxsm <[email protected]>
AuthorDate: Sun Apr 2 09:52:48 2023 +0800

    [ISSUE #6523] Schematic diagram of adding BatchConsumeQueue storage unit 
(#6524)
---
 .../apache/rocketmq/store/queue/BatchConsumeQueue.java    | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git 
a/store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java 
b/store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java
index 8a307b957..e60f09bce 100644
--- a/store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java
+++ b/store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java
@@ -44,7 +44,20 @@ import org.apache.rocketmq.store.logfile.MappedFile;
 public class BatchConsumeQueue implements ConsumeQueueInterface, 
FileQueueLifeCycle {
     protected static final Logger log = 
LoggerFactory.getLogger(LoggerName.STORE_LOGGER_NAME);
 
-    //position 8, size 4, tagscode 8, storetime 8, msgBaseOffset 8, batchSize 
2, compactedOffset 4, reserved 4
+    /**
+     * BatchConsumeQueue's store unit. Format:
+     * <pre>
+     * 
┌─────────────────────────┬───────────┬────────────┬──────────┬─────────────┬─────────┬───────────────┬─────────┐
+     * │CommitLog Physical Offset│ Body Size │Tag HashCode│Store 
time│msgBaseOffset│batchSize│compactedOffset│reserved │
+     * │        (8 Bytes)        │ (4 Bytes) │ (8 Bytes)  │(8 Bytes) │(8 
Bytes)    │(2 Bytes)│   (4 Bytes)   │(4 Bytes)│
+     * 
├─────────────────────────┴───────────┴────────────┴──────────┴─────────────┴─────────┴───────────────┴─────────┤
+     * │                                                  Store Unit           
                                        │
+     * │                                                                       
                                        │
+     * </pre>
+     * BatchConsumeQueue's store unit. Size:
+     * CommitLog Physical Offset(8) + Body Size(4) + Tag HashCode(8) + Store 
time(8) +
+     * msgBaseOffset(8) + batchSize(2) + compactedOffset(4) + reserved(4)= 46 
Bytes
+     */
     public static final int CQ_STORE_UNIT_SIZE = 46;
     public static final int MSG_TAG_OFFSET_INDEX = 12;
     public static final int MSG_STORE_TIME_OFFSET_INDEX = 20;

Reply via email to