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

twice pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/kvrocks-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 53bf83c  Add document for bitmap with empty segment and smaller than 
1KiB segment (#234)
53bf83c is described below

commit 53bf83c7b493379ff1c7a8ac7366ddddd5b81cb9
Author: mwish <[email protected]>
AuthorDate: Tue Jul 23 20:46:53 2024 +0800

    Add document for bitmap with empty segment and smaller than 1KiB segment 
(#234)
    
    * Add document for bitmap with empty segment and smaller than 1KiB segment
    
    * Update community/data-structure-on-rocksdb.md
    
    * Update community/data-structure-on-rocksdb.md
    
    Co-authored-by: Twice <[email protected]>
    
    ---------
    
    Co-authored-by: Twice <[email protected]>
---
 community/data-structure-on-rocksdb.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/community/data-structure-on-rocksdb.md 
b/community/data-structure-on-rocksdb.md
index 7e0eaf3..1cf54a4 100644
--- a/community/data-structure-on-rocksdb.md
+++ b/community/data-structure-on-rocksdb.md
@@ -212,6 +212,8 @@ 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|1024` (when the version is 1, and fragment 
index is `1`, kvrocks will use `1 * 1024` as the index key), then fetch the 
subkey from RocksDB and ch [...]
 
+A nonexistent segment means all bits are 0 in this segment. The bitmap design 
is very efficient when the bitmap is sparse. Besides, a segment could be less 
than 1KiB, and the "padding" bits are always regarded as 0.
+
 ## SortedInt
 
 SortedInt is a set with members being type int and sorted in ascending order:

Reply via email to