Skip to main content

MetadataRow

Enum MetadataRow 

Source
pub enum MetadataRow {
    Inode {
        inode_id: InodeId,
        inode_kind: InodeKind,
        created_seq: ChangeSeq,
    },
    DirentryBind {
        parent_inode_id: InodeId,
        name_key: NameKey,
        display_name: DisplayName,
        child_inode_id: InodeId,
        bind_seq: ChangeSeq,
        bind_delta_index: u32,
    },
    DirentryUnbind {
        parent_inode_id: InodeId,
        name_key: NameKey,
        display_name: DisplayName,
        child_inode_id: InodeId,
        bind_seq: ChangeSeq,
        bind_delta_index: u32,
        unbind_seq: ChangeSeq,
        unbind_delta_index: u32,
    },
    Revision {
        inode_id: InodeId,
        revision_no: RevisionNo,
        committed_seq: ChangeSeq,
        committed_at_ms: u64,
        revision_delta_index: u32,
        content_ref: ContentRef,
    },
    Tombstone {
        root_inode_id: InodeId,
        tombstone_seq: ChangeSeq,
        tombstone_delta_index: u32,
        action: TombstoneRowAction,
        deleted_at_ms: u64,
        parent_inode_id: Option<InodeId>,
        name_key: Option<NameKey>,
        display_name: Option<DisplayName>,
    },
    ActiveDeletion {
        root_inode_id: InodeId,
        deleted_at_seq: ChangeSeq,
        action: ActiveDeletionRowAction,
    },
    CommitReceipt {
        commit_id: CommitId,
        semantic_commit_fingerprint: String,
        committed_seq: ChangeSeq,
        committed_at_ms: u64,
        message: Option<String>,
    },
}
Expand description

Stores one materialized metadata event in an SST segment.

See metadata segments.

Variants§

§

Inode

Establishes one inode’s immutable identity and kind.

Fields

§inode_id: InodeId

Namespace-scoped inode identity allocated by the publishing writer.

§inode_kind: InodeKind

Classification fixed when the inode was created.

§created_seq: ChangeSeq

Commit sequence from which the inode can become visible.

§

DirentryBind

Records one generation of a directory name binding.

Fields

§parent_inode_id: InodeId

Directory in which the name was bound.

§name_key: NameKey

Policy-derived key used for uniqueness and lookup.

§display_name: DisplayName

User-facing component spelling retained for directory responses.

§child_inode_id: InodeId

Inode reached while this binding generation remains active.

§bind_seq: ChangeSeq

Commit sequence that created this binding generation.

§bind_delta_index: u32

Position that disambiguates the binding within bind_seq.

§

DirentryUnbind

Retires one exact directory-binding generation.

Fields

§parent_inode_id: InodeId

Directory that held the targeted binding.

§name_key: NameKey

Canonical name key of the targeted binding.

§display_name: DisplayName

User-facing spelling the retired binding carried.

§child_inode_id: InodeId

Child identity recorded by the targeted binding.

§bind_seq: ChangeSeq

Commit sequence that created the binding being retired.

§bind_delta_index: u32

Delta position of the binding being retired.

§unbind_seq: ChangeSeq

Commit sequence from which this unbind takes effect.

§unbind_delta_index: u32

Position that disambiguates the unbind within unbind_seq.

§

Revision

Publishes one immutable content revision for a file inode.

Fields

§inode_id: InodeId

File inode whose history contains the revision.

§revision_no: RevisionNo

Monotonic revision number within that file’s history.

§committed_seq: ChangeSeq

Namespace sequence that published the revision.

§committed_at_ms: u64

The owning commit’s observational wall-clock stamp, denormalized onto the row so revision reads answer times without a receipt join. Never a validity input; committed_seq is the order.

§revision_delta_index: u32

Delta position that disambiguates the revision within committed_seq.

§content_ref: ContentRef

Immutable bytes published by the revision.

§

Tombstone

Changes whether one root inode has an active subtree tombstone.

Fields

§root_inode_id: InodeId

Inode whose rooted subtree the event governs.

§tombstone_seq: ChangeSeq

Commit sequence that published this tombstone event.

§tombstone_delta_index: u32

Position that disambiguates the event within tombstone_seq.

§action: TombstoneRowAction

What this event did; readers take the newest row per root and treat a revoke newest row as “no active tombstone”.

§deleted_at_ms: u64

Wall-clock stamp of the recording commit. Observational, like every committed_at_ms.

§parent_inode_id: Option<InodeId>

Directory that held the deleted binding, for set rows from path deletes; tombstone rows are immortal, so this is where a deleted name survives after unbind rows age out.

§name_key: Option<NameKey>

Canonical key of the deleted binding, when known.

§display_name: Option<DisplayName>

User-facing spelling of the deleted binding, when known.

§

ActiveDeletion

Names one deletion generation in the derived active-deletions family.

The row is not a new event: the materializer derives it from the tombstone family, adding a listed row for each set and a removed row for each revoke, so the trash listing is a range scan instead of a walk over every deletion the namespace ever recorded.

Fields

§root_inode_id: InodeId

Subtree root the deletion covers. With deleted_at_seq this is exactly the handle undelete addresses.

§deleted_at_seq: ChangeSeq

Commit sequence of the deletion this row speaks for. A removed row repeats its target’s sequence, not the undelete’s, so the two rows sort together.

§action: ActiveDeletionRowAction

Whether the deletion is still recoverable, and the listing detail it carries while it is.

§

CommitReceipt

Preserves the evidence needed to answer a retried logical commit.

Fields

§commit_id: CommitId

Caller idempotency key whose later reuse is checked against this row.

§semantic_commit_fingerprint: String

Digest used to distinguish a safe retry from conflicting id reuse.

§committed_seq: ChangeSeq

Namespace sequence assigned to the accepted commit.

§committed_at_ms: u64

The commit’s observational wall-clock stamp. Receipts are the durable per-commit record once WAL history drops below the retention floor, so the stamp lives here for every commit, revision-bearing or not.

§message: Option<String>

Caller annotation preserved for idempotent response reconstruction.

Implementations§

Source§

impl MetadataRow

Source

pub fn row_key(&self) -> String

Builds this row’s canonical durable key in its primary table family.

See metadata segments.

Source

pub fn row_key_for_family(&self, family: MetadataTableFamily) -> String

Builds this row’s durable key using the selected primary or secondary ordering.

See metadata segments.

Source

pub fn filter_key_for_family(&self, family: MetadataTableFamily) -> String

The exact lookup prefix a point read probes for this row in family, and therefore the key inserted into the segment’s bloom filter. The two sides must agree byte-for-byte — a filter is an exact-match structure — so both are defined here, next to the row keys they shorten. Range scans at coarser granularity (a whole directory, a wave of names) do not consult filters.

Trait Implementations§

Source§

impl Clone for MetadataRow

Source§

fn clone(&self) -> MetadataRow

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 Debug for MetadataRow

Source§

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

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

impl<'de> Deserialize<'de> for MetadataRow

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for MetadataRow

Source§

impl PartialEq for MetadataRow

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for MetadataRow

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MetadataRow

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<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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.