Module key

Source

Modules§

range_delete_backward_compatibility_serde_struct

Structs§

FullKey
FullKey is an internal concept in storage. It associates UserKey with an epoch.
FullKeyTracker
TODO: Temporary bypass full key check. Remove this field after #15099 is resolved.
TableKey
TableKey is an internal concept in storage. It’s a wrapper around the key directly from the user, to make the code clearer and avoid confusion with encoded UserKey and FullKey.
UserKey
UserKey is is an internal concept in storage. In the storage interface, user specifies table_key and table_id (in ReadOptions or WriteOptions) as the input. The storage will group these two values into one struct for convenient filtering.

Constants§

EMPTY_SLICE 🔒
EPOCH_LEN
MAX_KEY_LEN
TABLE_PREFIX_LEN

Statics§

EMPTY_BYTES 🔒
EMPTY_VEC 🔒

Traits§

CopyFromSlice
EmptySliceRef
SetSlice

Functions§

bound_table_key_range
Bound table key range with table id to generate a new user key range.
end_bound_of_prefix
Get the end bound of the given prefix when transforming it to a key range.
end_bound_of_vnode
Unbounded if the vnode is the maximum representable value (i.e. [VirtualNode::MAX_REPRESENTABLE]), otherwise Excluded the next vnode.
gen_key_from_bytes
gen_key_from_str
get_table_id
Extract table id from encoded FullKey
get_user_key
Extract encoded UserKey from encoded FullKey but allow empty slice
is_empty_key_range
key_with_epoch
Converts user key to full key by appending epoch to the user key.
map_table_key_range
next_epoch
compute the next epoch, and don’t change the bytes of the u8 slice.
next_full_key
compute the next full key of the given full key
next_key
Computes the next key of the given key.
next_key_no_alloc 🔒
prefix_slice_with_vnode
prefixed_range_with_vnode
Prepend the prefix to the given key range.
prev_epoch
compute the prev epoch, and don’t change the bytes of the u8 slice.
prev_full_key
compute the prev full key of the given full key
prev_key
Computes the previous key of the given key.
range_of_prefix
Transform the given prefix to a key range.
split_key_epoch
Splits a full key into its user key part and epoch part.
start_bound_of_excluded_prefix
Get the start bound of the given prefix when it is excluded from the range.
table_key
Extract table key from encoded UserKey without table id part
user_key
Extract encoded UserKey from encoded FullKey without epoch part
vnode
Ensure there is only one vnode involved in table key range and return the vnode.
vnode_range
Returns left inclusive and right exclusive vnode index of the given range.

Type Aliases§

FullKeyRange
KeyPayloadType
TableKeyRange
UserKeyRange
UserKeyRangeRef