Skip to main content

BlockType

Enum BlockType 

Source
pub enum BlockType {
Show 16 variants Data, Index, Filter, Meta, RangeTombstone, Manifest, ManifestFooter, BlockLayout, Locator, SeqnoBounds, ZoneMap, DeleteBitmap, ColumnPageDirectory, ColumnPage, ColumnZones, OwnedBlobObjects,
}
Expand description

The mutually-exclusive ROLE of a block within a table file.

BlockType answers “what is this block and which parser decodes its logical structure” — not “how was its payload post-processed”. Orthogonal, composable transform layers (compression, encryption, Reed-Solomon ECC, per-KV checksum footer) are NOT roles: they stack on top of a block of any role and are recorded in the block header’s block_flags bitfield, not here. A compressed, encrypted, per-KV-checked data block is still BlockType::Data with three transform bits set.

Variants§

§

Data

User key/value entries (the SST data payload).

§

Index

Block handles (offset/size/key/seqno) pointing at data blocks.

§

Filter

Bloom / Ribbon filter bit arrays.

§

Meta

Sorted key/value table properties (the SST metadata section).

§

RangeTombstone

Range tombstone entries, written as a separate block.

§

Manifest

One section of the Blocks-based manifest (e.g. tables, blob_files, format_version). Payload is the raw section bytes that the manifest writer puts there. All Block-level protections (XXH3, optional ECC, optional AEAD) apply, so the section gains bit-rot defence + (optional) encryption / recovery automatically.

§

ManifestFooter

Footer Block of the Blocks-based manifest. Payload carries manifest_layout_version, flags, section count, and the table of contents (TOC) for the surrounding Manifest section Blocks. Written last (primary read target) and mirrored at file offset 0 in a 4 KiB padded region for partial-write recovery.

§

BlockLayout

Optional per-table index of inner zstd-block layouts: for each data block that compressed into >= 2 inner zstd blocks, its file offset and the cumulative decompressed END offsets of those inner blocks. Lets a range query partial-decode only the inner blocks covering a key range. Absent unless the table has at least one such multi-inner-block block.

§

Locator

Optional per-table retrieval-ribbon locator section: maps each key to a packed (block_id, slot) for O(1) point reads. Present by default (block precision); absent when the level’s locator policy is disabled or the per-SST ribbon could not be built.

§

SeqnoBounds

Optional per-table seqno-bounds section: maps each data block’s file offset to its [seqno_min, seqno_max], powering the scan_since_seqno block-skip without bloating the index entries. Absent unless seqno_in_index is on.

§

ZoneMap

Optional per-table zone-map section: maps each data block’s file offset to per-column (min, max, null_count, row_count) statistics, letting a range / analytical scan skip a block whose stats prove no predicate match without decoding it. Kept parallel to the index (like Self::SeqnoBounds) so point reads never load it. Off by default; absent unless the zone-map policy is enabled.

§

DeleteBitmap

Optional per-table positional delete-bitmap section: marks, by row position, which rows of the table’s columnar segment are deleted. A pure membership set (MVCC reconciled at materialization via the compaction watermark), applied as a mask at scan time. Kept parallel to the data (like Self::ZoneMap) so a read without deletes pays nothing. Absent unless the segment has materialized deletes.

§

ColumnPageDirectory

The directory of one columnar row group’s pages: for each page, where it starts relative to the row group, how long it is, and which part of which column’s encoding it holds.

The index points at this block, not at the pages, so a row group keeps exactly one index entry and block_id keeps its meaning. It is written first in the group, immediately ahead of the page holding keys and MVCC metadata, so one coalesced read covers what every read of the group needs before it knows anything else.

§

ColumnPage

One page of a columnar row group: a single part of a single column’s encoding, for the group’s rows. Row groups are produced by the transpose on flush and compaction for a columnar tree, and by columnar ingest; the codec framework that fills their pages is built only with the columnar feature, while the wire tags are reserved unconditionally.

An ordinary block in every other respect, and deliberately so: its header, checksum, compression, encryption and ECC are the ones already defined and tested. What it does not have is an index entry — it is reached through Self::ColumnPageDirectory, and its identity binds its LOGICAL position (row group ordinal, page slot) to replace the position integrity the index supplies for blocks it names.

§

ColumnZones

The statistics zones of a columnar row group’s row pages for its columns other than the key: one zone per row page and column. Written last in the group, after its pages, so only a read that prunes on one of those columns reads it; a full scan or a projection that does not prune never pays for it. The key column’s zones live in the Self::ColumnPageDirectory, which every point read reads anyway.

§

OwnedBlobObjects

Optional per-table list of the blob objects the table’s cell rows own, sorted by blob file and offset: what dropping the whole table releases, read without reading its data. Absent when the table owns no cell-row object.

Trait Implementations§

Source§

impl Clone for BlockType

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BlockType

Source§

impl Debug for BlockType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BlockType

Source§

impl From<BlockType> for u8

Source§

fn from(val: BlockType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for BlockType

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BlockType

Source§

impl TryFrom<u8> for BlockType

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V