Skip to main content

MetadataRow

Enum MetadataRow 

Source
pub enum MetadataRow {
    Inode {
        inode_id: InodeId,
        inode_kind: InodeKind,
        created_seq: ChangeSeq,
        created_by: ActorRef,
        created_at_ms: u64,
    },
    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,
        actor: ActorRef,
        revision_delta_index: u32,
        content_ref: ContentRef,
    },
    Tombstone {
        root_inode_id: InodeId,
        generation: TombstoneGeneration,
        action: TombstoneRowAction,
        deleted_at_ms: u64,
        actor: ActorRef,
    },
    ActiveDeletion {
        root_inode_id: InodeId,
        deleted_at_seq: ChangeSeq,
        action: ActiveDeletionRowAction,
    },
    CommitReceipt {
        commit_id: CommitId,
        actor: ActorRef,
        semantic_commit_fingerprint: String,
        committed_seq: ChangeSeq,
        committed_at_ms: u64,
        message: Option<String>,
    },
    AttributesRevision {
        inode_id: InodeId,
        attributes_revision_no: AttributeRevisionNo,
        committed_seq: ChangeSeq,
        delta_index: u32,
        actor: ActorRef,
        updated_at_ms: u64,
        attributes: Attributes,
    },
}
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.

§created_by: ActorRef

Actor that created the inode, as supplied by the application.

§created_at_ms: u64

Time the inode was created, in Unix milliseconds.

§

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.

§actor: ActorRef

Actor responsible for this revision, as supplied by the application.

§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.

§generation: TombstoneGeneration

Where this event sits in the namespace’s history, and the generation a later revoke names.

§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.

§actor: ActorRef

Actor responsible for this tombstone event.

§

ActiveDeletion

Derived row used to list currently recoverable deletions.

Materialization writes listed for each tombstone set and removed for each revoke. This lets trash listing use an ordered range scan instead of replaying all historical deletion events.

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.

§actor: ActorRef

Actor responsible for the commit, as supplied by the application.

§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.

§

AttributesRevision

Publishes one inode’s complete attribute map at one revision.

The row is whole state, not a change: a reader takes the newest row for an inode and needs nothing older. An inode with no row anywhere is at revision 0 with an empty map, so nothing is written until a caller writes an attribute.

Fields

§inode_id: InodeId

Inode whose attributes this revision states.

§attributes_revision_no: AttributeRevisionNo

Monotonic per-inode attribute revision.

§committed_seq: ChangeSeq

Namespace sequence that published the revision.

§delta_index: u32

Delta position that disambiguates the revision within committed_seq.

§actor: ActorRef

Actor responsible for this attribute update.

§updated_at_ms: u64

Time of the attribute update, in Unix milliseconds.

§attributes: Attributes

The inode’s complete attribute map at this revision. An empty map is the cleared state.

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.