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: DataAccessPolicyPolicy payload to publish.
mode: AuthorizationModeEnforcement strength for the policy.
CreateRecordHeader
Create a record header with the given id, ordinal and label.
Fields
DeleteRecordHeader
Delete a record header by id, ordinal and label.
Fields
RetypeRecordHeader
Move a record between its single primary-label membership sets while preserving its stable public id, ordinal, fields, and relationships.
Fields
CreateRelationshipHeader
Create a relationship header between two records.
Fields
DeleteRelationshipHeader
Delete a relationship header by id, ordinal and type.
Fields
EnsureFamily
Create a property family if it does not already exist.
Fields
EnsureDefinition
Create a property definition within a family.
Fields
cardinality: CardinalityAllowed value cardinality.
nullability: NullabilityNullability 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
PutOccurrence
Insert or update one property occurrence.
Fields
row: OccurrenceRowOccurrence row to persist.
DeleteOccurrence
Delete one property occurrence.
Fields
row: OccurrenceRowOccurrence row to remove.
EnsureEmbeddingSpace
Create or update an embedding space.
Fields
info: EmbeddingSpaceInfoSpace definition to ensure.
UpsertEmbeddingBinding
Insert or update an embedding binding.
Fields
binding: EmbeddingBindingBinding to persist.
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.
SetMetaValue
Replicated meta bookkeeping (projection watermarks and similar); value semantics are opaque to the state machine.
SetMetaBlob
Replicated opaque blob (policies, configuration); replayed verbatim by the deterministic state machine like any other mutation.
DeleteMetaBlob
Deterministic deletion of a replicated meta blob (index registry rows).
DeleteRawKey
Delete one tenant-scoped raw key during an explicit maintenance repair. The maintenance caller must validate the key belongs to its tenant.
PutRawKey
Put one tenant-scoped raw key during an explicit maintenance fixture or rebuild operation.
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.
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: TenantScopeSHA-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.
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
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.
DropIndex
Start dropping an index by name: Dropping { cursor: 0 }.
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.
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
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: DataAccessPolicyPolicy payload to publish.
mode: AuthorizationModeEnforcement strength for the policy.