This is an automated email from the ASF dual-hosted git repository.

duhengforever 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 c832523  [ISSUE #3757] docs: Polish the document 'Design_Query.md'. 
(#3758)
c832523 is described below

commit c832523742b52306cfabcee03959a85da62e2e9d
Author: 彭小漪 <[email protected]>
AuthorDate: Sat Jan 15 17:25:44 2022 +0800

    [ISSUE #3757] docs: Polish the document 'Design_Query.md'. (#3758)
---
 docs/en/Design_Query.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/en/Design_Query.md b/docs/en/Design_Query.md
index 983d48d..887a073 100644
--- a/docs/en/Design_Query.md
+++ b/docs/en/Design_Query.md
@@ -12,6 +12,8 @@ The MessageId in RocketMQ has a total length of 16 bytes, 
including the broker a
 
 The IndexFile provides the user with the querying service by “Querying 
Messages by Message Key”. The IndexFile is stored in 
$HOME\store\index${fileName}, and the file name is named after the timestamp at 
the time of creation. The file size is fixed, which is 420,000,040 bytes 
(40+5million\*4+20million\*20). If the UNIQ_KEY is set in the properties of the 
message, then the "topic + ‘#’ + UNIQ_KEY" will be used as the index. Likewise, 
if the KEYS is set in the properties of the message (mu [...]
 
-The index data contains four fields, Key Hash, CommitLog offset, Timestamp and 
NextIndex offset, for a total of 20 Bytes. The NextIndex offset of the index 
data will point to the previous index data if the Key Hash of the index data is 
the same as that of the previous index data. If a hash conflict occurs, then 
the NextIndex offset can be used as the field to string all conflicting indexes 
in a linked list. What the Timestamp records is the time difference between two 
storeTimestamps, in [...]
+The header of IndexFile contains eight fields, `beginTimestamp`(8 bytes), 
`endTimestamp`(8 bytes), `beginPhyOffset`(8 bytes), `endPhyOffset`(8 bytes), 
`hashSlotCount`(4 bytes), and `indexCount`(4 bytes).`beginTimestamp` and 
`endTimestamp` represents the storeTimestamp of the message corresponding to 
the first and last index, `beginPhyOffset` and `endPhyOffset` represent the 
physical offset of the message corresponding to the first and last index. 
`hashSlotCount` represents the count of h [...]
+
+The index data contains four fields, `Key Hash`, `CommitLog offset`, 
`Timestamp` and `NextIndex offset`, for a total of 20 Bytes. The `NextIndex 
offset` of the index data will point to the previous index data if the `Key 
Hash` of the index data is the same as that of the previous index data. If a 
hash conflict occurs, then the `NextIndex offset` can be used as the field to 
string all conflicting indexes in a linked list. What the `Timestamp` records 
is the time difference between the `st [...]
 
 The specific method of "Query Message by Message Key" is that the topic and 
message key are used to find the record in the IndexFile, and then read the 
message from the file of CommitLog according to the CommitLog offset in this 
record.
\ No newline at end of file

Reply via email to