MCPcopy Create free account
hub / github.com/apache/kvrocks / SegmentSubKeyIndexForBit

Function SegmentSubKeyIndexForBit

src/types/redis_bitmap.cc:94–96  ·  view source on GitHub ↗

Constructing sub-key index, see: https://kvrocks.apache.org/community/data-structure-on-rocksdb#bitmap-sub-keys-values The value is also equal to the offset of the bytes in the bitmap.

Source from the content-addressed store, hash-verified

92// https://kvrocks.apache.org/community/data-structure-on-rocksdb#bitmap-sub-keys-values
93// The value is also equal to the offset of the bytes in the bitmap.
94uint32_t SegmentSubKeyIndexForBit(uint32_t bit_offset) {
95 return (bit_offset / kBitmapSegmentBits) * kBitmapSegmentBytes;
96}
97
98rocksdb::Status Bitmap::GetMetadata(engine::Context &ctx, const Slice &ns_key, BitmapMetadata *metadata,
99 std::string *raw_value) {

Callers 2

GetBitMethod · 0.85
SetBitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected