pub struct TxAccumulator {
pub base_ci: u64,
pub tenant: TenantId,
pub buffer: BTreeMap<Vec<u8>, Option<Vec<u8>>>,
pub deps: DependencySet,
pub mutations: Vec<Mutation>,
pub preconditions: Vec<Precondition>,
pub base_view: Option<Arc<ReadView>>,
}Expand description
Accumulated state of one in-flight cross-service transaction. The buffer is
the transaction’s uncommitted write overlay (read-buffer-first like Txn);
deps records the public reads performed inside the transaction;
mutations/preconditions replay the writes atomically at commit.
Fields§
§base_ci: u64Commit index the transaction’s snapshot reads are based on.
tenant: TenantIdTenant that owns the transaction.
buffer: BTreeMap<Vec<u8>, Option<Vec<u8>>>Uncommitted write overlay, keyed by storage key.
deps: DependencySetPublic read dependencies recorded inside the transaction.
mutations: Vec<Mutation>Mutations accumulated across statements, replayed at commit.
preconditions: Vec<Precondition>Preconditions accumulated across statements, checked at commit.
base_view: Option<Arc<ReadView>>Pinned snapshot all transaction reads resolve at. Cross-request
coordinators set this at BEGIN so statements and expansion observe the
transaction’s snapshot rather than current committed state. None
keeps current-state reads for embedded/short-lived callers.