You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "enjoy-binbin (via GitHub)" <gi...@apache.org> on 2023/04/14 14:38:00 UTC

[GitHub] [incubator-kvrocks-website] enjoy-binbin commented on a diff in pull request #89: Minor cleanups in data-structure-on-rocksdb docs

enjoy-binbin commented on code in PR #89:
URL: https://github.com/apache/incubator-kvrocks-website/pull/89#discussion_r1166920300


##########
community/data-structure-on-rocksdb.md:
##########
@@ -203,15 +203,15 @@ key =>  |  flags   |  expire    |  version  |  size     |
 
 #### bitmap sub keys-values
 
-We break the bitmap values into fragments(1KiB, 8192 bits/fragment), and subkey is the index of the fragment. for example, when the request to set the bit of 1024 would locate in the first fragment with index 0, to set a bit of 80970 would locate in 10th fragment with index 9.
+We break the bitmap values into fragments(1KiB, 8192 bits/fragment), and subkey is the index of the fragment. For example, when the request to set the bit of 1024 would locate in the first fragment with index 0, to set a bit of 80970 would locate in 10th fragment with index 9.
 
 ```text
                      +---------------+
 key|version|index => |    fragment   |
                      +---------------+
 ```
 
-when the user requests to get it of position P, Kvrocks would first fetch the metadata with bitmap's key and calculate the index of the fragment with bit position, then fetch the bitmap fragment with composed key and find the bit in fragment offset. For example, `getbit bitmap 8193`, the fragment index is `1` (8193/8192) and subkey is `bitmap|1|1` (when the version is 1), then fetch the subkey from RocksDB and check if the bit of offset `1`(8193%8192) is set or not.
+When the user requests to get it of position P, Kvrocks would first fetch the metadata with bitmap's key and calculate the index of the fragment with bit position, then fetch the bitmap fragment with composed key and find the bit in fragment offset. For example, `getbit bitmap 8193`, the fragment index is `1` (8193/8192) and subkey is `bitmap|1|1` (when the version is 1), then fetch the subkey from RocksDB and check if the bit of offset `1`(8193%8192) is set or not.

Review Comment:
   btw, `When the user requests to get it of position P` this sentence looks a bit odd...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org