Skip to main content

Mutation

Enum Mutation 

Source
pub enum Mutation {
Show 29 variants SetSecurityPolicy { policy: DataAccessPolicy, mode: AuthorizationMode, }, CreateRecordHeader { record_id: [u8; 16], ordinal: u64, label: String, }, DeleteRecordHeader { ordinal: u64, record_id: [u8; 16], label: String, }, RetypeRecordHeader { record_id: [u8; 16], ordinal: u64, from_label: String, to_label: String, }, CreateRelationshipHeader { relationship_id: [u8; 16], ordinal: u64, rel_type: String, source_ord: u64, target_ord: u64, source_id: [u8; 16], target_id: [u8; 16], }, DeleteRelationshipHeader { relationship_id: [u8; 16], ordinal: u64, rel_type: String, source_ord: u64, target_ord: u64, }, EnsureFamily { family_id: u64, namespace: String, owner_scope: OwnerKind, normalized_name: String, display_name: String, }, EnsureDefinition { property_id: u64, family_id: u64, type_state: TypeState, cardinality: Cardinality, nullability: Nullability, }, DeleteFamily { family_id: u64, namespace: String, owner_scope: OwnerKind, normalized_name: String, display_name: String, }, PutOccurrence { row: OccurrenceRow, canonical_value_bytes: Option<Vec<u8>>, }, DeleteOccurrence { row: OccurrenceRow, }, EnsureEmbeddingSpace { alias: String, info: EmbeddingSpaceInfo, new: bool, }, UpsertEmbeddingBinding { binding: EmbeddingBinding, vector: Option<Vec<f32>>, expect_live_hash: bool, }, ClearEmbeddingSpace { alias: String, space_id: u64, }, SetMetaValue { key: String, value: u64, }, SetMetaBlob { key: String, value: Vec<u8>, }, DeleteMetaBlob { key: String, }, DeleteRawKey { key: Vec<u8>, }, PutRawKey { key: Vec<u8>, value: Vec<u8>, }, PurgeTenantChunk { max_keys: u64, }, RegisterTenant { scope: TenantScope, }, RetireTenant, ReclaimEmbeddingSlots { through_ci: u64, }, DefineIndex { name: String, label: String, property: String, kind: IndexKind, }, IndexBackfill { id: u32, through: Option<u64>, }, DropIndex { name: String, }, IndexDrop { id: u32, through: Option<u64>, }, IndexApplied { index: u32, upto: u64, owners: Vec<u64>, }, SetSecurityPolicyThreshold { policy: DataAccessPolicy, mode: AuthorizationMode, min_count: u64, },
}
Expand description

A single deterministic mutation applied by the state machine.

Variants§

§

SetSecurityPolicy

Publish a tenant policy, using the applying CI as its generation.

Fields

§policy: DataAccessPolicy

Policy payload to publish.

§mode: AuthorizationMode

Enforcement strength for the policy.

§

CreateRecordHeader

Create a record header with the given id, ordinal and label.

Fields

§record_id: [u8; 16]

Public id of the new record.

§ordinal: u64

Dense ordinal assigned to the record.

§label: String

Primary label of the record.

§

DeleteRecordHeader

Delete a record header by id, ordinal and label.

Fields

§ordinal: u64

Dense ordinal of the record.

§record_id: [u8; 16]

Public id of the record.

§label: String

Primary label of the record.

§

RetypeRecordHeader

Move a record between its single primary-label membership sets while preserving its stable public id, ordinal, fields, and relationships.

Fields

§record_id: [u8; 16]

Public id of the record.

§ordinal: u64

Dense ordinal of the record.

§from_label: String

Label the record is leaving.

§to_label: String

Label the record is moving to.

§

CreateRelationshipHeader

Create a relationship header between two records.

Fields

§relationship_id: [u8; 16]

Public id of the new relationship.

§ordinal: u64

Dense ordinal assigned to the relationship.

§rel_type: String

Relationship type.

§source_ord: u64

Ordinal of the source record.

§target_ord: u64

Ordinal of the target record.

§source_id: [u8; 16]

Public id of the source record.

§target_id: [u8; 16]

Public id of the target record.

§

DeleteRelationshipHeader

Delete a relationship header by id, ordinal and type.

Fields

§relationship_id: [u8; 16]

Public id of the relationship.

§ordinal: u64

Dense ordinal of the relationship.

§rel_type: String

Relationship type.

§source_ord: u64

Ordinal of the source record.

§target_ord: u64

Ordinal of the target record.

§

EnsureFamily

Create a property family if it does not already exist.

Fields

§family_id: u64

Dense id of the family.

§namespace: String

Namespace of the property.

§owner_scope: OwnerKind

Whether the family is owned by records or relationships.

§normalized_name: String

Normalized name used for lookup.

§display_name: String

Human-readable display name.

§

EnsureDefinition

Create a property definition within a family.

Fields

§property_id: u64

Dense id of the property.

§family_id: u64

Family the property belongs to.

§type_state: TypeState

Current type resolution state.

§cardinality: Cardinality

Allowed value cardinality.

§nullability: Nullability

Nullability constraint.

§

DeleteFamily

Atomically remove a property family: every occurrence of the family (records and relationships), the family row/signature, and all property definitions. Used by the protocol deleteProperty operation.

Fields

§family_id: u64

Dense id of the family.

§namespace: String

Namespace of the property.

§owner_scope: OwnerKind

Whether the family is owned by records or relationships.

§normalized_name: String

Normalized name used for lookup.

§display_name: String

Human-readable display name.

§

PutOccurrence

Insert or update one property occurrence.

Fields

§row: OccurrenceRow

Occurrence row to persist.

§canonical_value_bytes: Option<Vec<u8>>

Canonical encoded payload, or None for payload-free states.

§

DeleteOccurrence

Delete one property occurrence.

Fields

§row: OccurrenceRow

Occurrence row to remove.

§

EnsureEmbeddingSpace

Create or update an embedding space.

Fields

§alias: String

Alias the space is reachable under.

§info: EmbeddingSpaceInfo

Space definition to ensure.

§new: bool

Whether this creates a new space.

§

UpsertEmbeddingBinding

Insert or update an embedding binding.

Fields

§binding: EmbeddingBinding

Binding to persist.

§vector: Option<Vec<f32>>

Vector payload to store, if any.

§expect_live_hash: bool

When set, statuses are recomputed against this expected live hash.

§

ClearEmbeddingSpace

v3: resolve and remove canonical binary vector keys at apply time. The alias must still identify this space; counters and the immutable space definition remain so a recreated alias receives a fresh space ID.

Fields

§alias: String

Alias of the space to clear.

§space_id: u64

Dense id of the space.

§

SetMetaValue

Replicated meta bookkeeping (projection watermarks and similar); value semantics are opaque to the state machine.

Fields

§key: String

Logical meta key.

§value: u64

New integer value.

§

SetMetaBlob

Replicated opaque blob (policies, configuration); replayed verbatim by the deterministic state machine like any other mutation.

Fields

§key: String

Logical meta key.

§value: Vec<u8>

New blob value.

§

DeleteMetaBlob

Deterministic deletion of a replicated meta blob (index registry rows).

Fields

§key: String

Logical meta key.

§

DeleteRawKey

Delete one tenant-scoped raw key during an explicit maintenance repair. The maintenance caller must validate the key belongs to its tenant.

Fields

§key: Vec<u8>

Canonical tenant-scoped key to remove.

§

PutRawKey

Put one tenant-scoped raw key during an explicit maintenance fixture or rebuild operation.

Fields

§key: Vec<u8>

Canonical tenant-scoped key to write.

§value: Vec<u8>

Value bytes to store.

§

PurgeTenantChunk

One bounded, resumable purge step: delete up to max_keys of the smallest remaining purgeable keys (tenant keyspace excluding the security subrange, then vector/ANN metadata), without retaining MVCC history for erased keys. The driver loops commits until nothing remains; expansion is a pure function of (state, batch), so replay reproduces the same sequence.

Fields

§max_keys: u64

Maximum number of keys this step may delete.

§

RegisterTenant

Register a tenant scope in the directory: assign the next ordinal unless the scope already has an active one. Expansion reads and bumps the directory sequence, so replay reproduces the ordinal.

Fields

§scope: TenantScope

SHA-256 digest of the scope value (the scope string is never stored).

§

RetireTenant

Retire the batch tenant’s ordinal after its keyspace is purged: both directory rows move to Purged, and the ordinal is never reassigned.

§

ReclaimEmbeddingSlots

Reclaim embedding vector slots whose superseding binding version is at or below through_ci (the GC watermark). A re-binding allocates a fresh slot and records the old one in the reclamation index; the old slot’s bytes stay readable by pinned views until the history floor passes it. Expansion deletes a bounded batch of the oldest reclaimable slots plus their reclamation rows; the driver loops commits until none remain.

Fields

§through_ci: u64

Highest superseding commit index safe to reclaim (inclusive).

§

DefineIndex

Declare an index: allocate the next id and store the definition as Building { cursor: 0 }. From this commit on, the deriver maintains entries of covered records.

Fields

§name: String

Tenant-unique name.

§label: String

Record label.

§property: String

Property name (normalized at expansion).

§kind: IndexKind

Index kind.

§

IndexBackfill

Advance a building index’s cursor to through (the deriver backfills the records it newly covers from their current values), or mark it Ready when through is None.

Fields

§id: u32

Index id.

§through: Option<u64>

New cursor, or None for Ready.

§

DropIndex

Start dropping an index by name: Dropping { cursor: 0 }.

Fields

§name: String

Index name.

§

IndexDrop

Advance a dropping index’s cursor to through (the deriver removes the entries it no longer covers), or remove the definition when through is None.

Fields

§id: u32

Index id.

§through: Option<u64>

New cursor, or None to remove the definition.

§

IndexApplied

An index applier (text or structural) processed owners of index index as of commit upto: remove each owner’s pending row unless a later commit re-marked it.

Fields

§index: u32

Index id.

§upto: u64

Snapshot the applier read.

§owners: Vec<u64>

Owners whose current text was applied.

§

SetSecurityPolicyThreshold

Mutation::SetSecurityPolicy with a small-count threshold. Appended last so earlier logs keep their variant indexes; written only when the threshold is set, so a log without one stays readable by binaries that predate it.

Fields

§policy: DataAccessPolicy

Policy payload to publish.

§mode: AuthorizationMode

Enforcement strength for the policy.

§min_count: u64

Smallest group a catalog read may report.

Trait Implementations§

Source§

impl Clone for Mutation

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

Source§

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

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

impl<'de> Deserialize<'de> for Mutation

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 PartialEq for Mutation

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 Serialize for Mutation

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 Mutation

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

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.